Commit 7aeec892 authored by Michael Turner's avatar Michael Turner
Browse files

fix

parent b416b1bb
......@@ -139,6 +139,17 @@ MACRO(ADD_NEKTAR_LIBRARY name component type)
SET_COMMON_PROPERTIES(${name})
# Set properties for building shared libraries
IF( ${type} STREQUAL "SHARED" )
# Properties specific to Mac OSX
IF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
# We allow undefined symbols to be looked up dynamically at runtime
# from the boost libraries linked by the executables.
SET_TARGET_PROPERTIES(${name}
PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup")
ENDIF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
ENDIF( ${type} STREQUAL "SHARED" )
INSTALL(TARGETS ${name}
EXPORT Nektar++Libraries
RUNTIME DESTINATION ${NEKTAR_BIN_DIR} COMPONENT ${component} OPTIONAL
......
......@@ -2,6 +2,10 @@ MACRO(ADD_UTILITIES_EXECUTABLE name component source)
ADD_EXECUTABLE(${name} ${source} ${ARGN})
SET_COMMON_PROPERTIES(${name})
TARGET_LINK_LIBRARIES(${name} MultiRegions)
IF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
SET_TARGET_PROPERTIES(${name}
PROPERTIES LINK_FLAGS "-Wl,-undefined,dynamic_lookup -Wl,-rpath,${CMAKE_INSTALL_PREFIX}/${LIB_DIR} -Wl,-rpath,${Boost_LIBRARY_DIRS}")
ENDIF( ${CMAKE_SYSTEM} MATCHES "Darwin-*")
SET_PROPERTY(TARGET ${name} PROPERTY FOLDER ${component})
INSTALL(TARGETS ${name}
RUNTIME DESTINATION ${NEKTAR_BIN_DIR} COMPONENT ${component})
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment