fix rpath for OS X

This commit is contained in:
Dmitry Maganov committed 2015-05-19 22:42:38 +06:00
1 parent 9f4c4abaca
commit 448949ef7a
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