Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Protect windows specific needs.
authornavarro <navarro@caraja.(none)>
Thu, 16 Feb 2012 10:21:42 +0000 (11:21 +0100)
committernavarro <navarro@caraja.(none)>
Thu, 16 Feb 2012 10:21:42 +0000 (11:21 +0100)
CMakeLists.txt

index 5fb0a00..f945dcf 100644 (file)
@@ -187,14 +187,16 @@ endif(COMPILER_C_VERSION_MAJOR_MINOR MATCHES "4.6")
 # SG_java
 add_library(SG_java SHARED ${JMSG_C_SRC})
 target_link_libraries(SG_java pcre pthread)
-set_target_properties(SG_java PROPERTIES LINK_FLAGS "-Wl,--subsystem,windows,--kill-at $ENV{SIMGRID_ROOT}/lib/libsimgrid.dll -L$ENV{SIMGRID_PCRE_LIBRARY_PATH}/lib")
-
-find_path(PEXPORTS_PATH NAMES pexports.exe PATHS NO_DEFAULT_PATHS)
-message(STATUS "pexports: ${PEXPORTS_PATH}")
-if(PEXPORTS_PATH)
-add_custom_command(TARGET SG_java POST_BUILD
-COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/libSG_java.dll > ${CMAKE_BINARY_DIR}/libSG_java.def)
-endif(PEXPORTS_PATH)
+set_target_properties(SG_java PROPERTIES LINK_FLAGS "${SIMGRID_LIB} -L$ENV{SIMGRID_PCRE_LIBRARY_PATH}/lib")
+if(WIN32)
+    set_target_properties(SG_java PROPERTIES LINK_FLAGS "-Wl,--subsystem,windows,--kill-at")
+    find_path(PEXPORTS_PATH NAMES pexports.exe PATHS NO_DEFAULT_PATHS)
+    message(STATUS "pexports: ${PEXPORTS_PATH}")
+    if(PEXPORTS_PATH)
+    add_custom_command(TARGET SG_java POST_BUILD
+    COMMAND ${PEXPORTS_PATH}/pexports.exe ${CMAKE_BINARY_DIR}/libSG_java.dll > ${CMAKE_BINARY_DIR}/libSG_java.def)
+    endif(PEXPORTS_PATH)
+endif(WIN32)
 
 # java_classes
 add_custom_command(