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)
+ # (useful when unpacking the native libraries from the jarfile)
set(CMAKE_INSTALL_RPATH "@loader_path/.")
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif()
set(SIMGRID_DEP "${SIMGRID_DEP} ${Boost_CONTEXT_LIBRARY}")
endif()
-if(HAVE_PTHREAD AND ${HAVE_THREAD_CONTEXTS} AND NOT APPLE)
- # Clang on recent Mac OS X is not happy about -pthread.
- SET(SIMGRID_DEP "${SIMGRID_DEP} -pthread")
+if(CMAKE_USE_PTHREADS_INIT AND ${HAVE_THREAD_CONTEXTS})
+ set(SIMGRID_DEP "${SIMGRID_DEP} ${CMAKE_THREAD_LIBS_INIT}")
endif()
if(SIMGRID_HAVE_LUA)