Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Modify teshs timings
[simgrid.git] / FindJavaSG.cmake
1 set(JAVA_INCLUDE_PATH "$ENV{JAVA_INCLUDE_PATH}")
2 set(JAVA_INCLUDE_PATH2 "$ENV{JAVA_INCLUDE_PATH}")
3
4 include(FindJava)
5 include(FindJNI)
6
7 message(STATUS "Looking for jni.h")
8 if(JAVA_INCLUDE_PATH)
9  message(STATUS "Looking for jni.h - found")
10 else(JAVA_INCLUDE_PATH)
11  message(STATUS "Looking for jni.h - not found")
12 endif(JAVA_INCLUDE_PATH)
13 if(JAVA_INCLUDE_PATH)
14         SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${JAVA_INCLUDE_PATH} ")
15         message(STATUS "Add flags -I${JAVA_INCLUDE_PATH}")
16 else(JAVA_INCLUDE_PATH)
17         message(STATUS "Need to set JAVA_INCLUDE_PATH to jni.h")
18 endif(JAVA_INCLUDE_PATH)
19
20 message(STATUS "Looking for jni_md.h")
21 if(JAVA_INCLUDE_PATH2)
22 message(STATUS "Looking for jni_md.h - found")
23 else(JAVA_INCLUDE_PATH2)
24 message(STATUS "Looking for jni_md.h - not found")
25 endif(JAVA_INCLUDE_PATH2)
26 if(JAVA_INCLUDE_PATH2)
27 if(NOT JAVA_INCLUDE_PATH STREQUAL JAVA_INCLUDE_PATH2)
28         SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}-I${JAVA_INCLUDE_PATH2} ")
29         message(STATUS "Add flags -I${JAVA_INCLUDE_PATH2}")
30 endif(NOT JAVA_INCLUDE_PATH STREQUAL JAVA_INCLUDE_PATH2)
31 endif(JAVA_INCLUDE_PATH2)
32
33 if(JAVA_COMPILE)
34 message(STATUS "Found javac: ${JAVA_COMPILE}")
35 else(JAVA_COMPILE)
36 message(FATAL_ERROR "Not found javac bin")
37 endif(JAVA_COMPILE)
38
39 if(JAVA_ARCHIVE)
40 message(STATUS "Found jar: ${JAVA_ARCHIVE}")
41 else(JAVA_ARCHIVE)
42 message(FATAL_ERROR "Not found jar bin")
43 endif(JAVA_ARCHIVE)