Merge pull request #80 from vonagam/fix_rpath_for_os_x

Fix rpath for OS X
This commit is contained in:
Zachariah Brown committed 2015-05-21 12:44:48 -04:00
commit 910bcc86d0
1 file changed
+8
+8
View File
@@ -56,6 +56,14 @@ macro(csfml_add_library target)
# link the target to its external dependencies (C++ SFML libraries)
target_link_libraries(${target} ${THIS_DEPENDS})
# build dylibs
if(SFML_OS_MACOSX AND BUILD_SHARED_LIBS)
# adapt install directory to allow distributing dylibs in user’s application bundle
set_target_properties(${target} PROPERTIES
BUILD_WITH_INSTALL_RPATH 1
INSTALL_NAME_DIR "@rpath")
endif()
# add the install rule
install(TARGETS ${target}
RUNTIME DESTINATION bin COMPONENT bin