Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cmake/java: don't rebuild the libs before building the jar if we won't pack them
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 28 Jun 2017 11:19:39 +0000 (13:19 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 28 Jun 2017 12:01:15 +0000 (14:01 +0200)
tools/cmake/Java.cmake

index 0e77fab..ebc2e3d 100644 (file)
@@ -71,8 +71,10 @@ else()
   add_jar(simgrid-java_jar ${JMSG_JAVA_SRC} OUTPUT_NAME simgrid)
 endif()
 
-add_dependencies(simgrid-java_jar simgrid-java)
-add_dependencies(simgrid-java_jar simgrid)
+if(enable_lib_in_jar)
+  add_dependencies(simgrid-java_jar simgrid-java)
+  add_dependencies(simgrid-java_jar simgrid)
+endif()
 
 if (enable_documentation)
   add_custom_command(
@@ -162,7 +164,7 @@ if(APPLE)
 
     COMMAND install_name_tool -change ${CMAKE_BINARY_DIR}/lib/libsimgrid.${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}${CMAKE_SHARED_LIBRARY_SUFFIX} @loader_path/libsimgrid.dylib ${JAVA_NATIVE_PATH}/${LIBSIMGRID_JAVA_SO}
   )
-endif()
+endif(APPLE)
 
   add_custom_command(
     TARGET simgrid-java_jar POST_BUILD