Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
xbt_fifo are no longer used, remove the code
[simgrid.git] / tools / cmake / MakeLib.cmake
index 5b16ebf..0d157fe 100644 (file)
@@ -1,5 +1,15 @@
 ### Make Libs
 
+# On Mac OSX, specify that rpath is useful to look for the dependencies
+# See https://cmake.org/Wiki/CMake_RPATH_handling and Java.cmake
+set(MACOSX_RPATH ON)
+if(APPLE)
+  # add the current location of libsimgrid-java.dynlib as a location for libsimgrid.dynlib
+  # (useful when unpacking the native libraries from the jarfile)
+  set(CMAKE_INSTALL_RPATH "@loader_path/.")
+  SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+endif()
+
 ###############################
 # Declare the library content #
 ###############################