From d6c1fda5bd46befb2154b23cd39db7ebe66dbb6d Mon Sep 17 00:00:00 2001 From: Marco Antognini Date: Fri, 9 Sep 2011 15:24:09 +0200 Subject: [PATCH] fixed creation of SFML.framework --- CMakeLists.txt | 6 ++++++ cmake/Macros.cmake | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 117af1ace..4ac5b1288 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,6 +174,12 @@ else() POST_BUILD COMMAND cp -r ${PROJECT_SOURCE_DIR}/include/SFML/* SFML.framework/Versions/2.0.0/Headers) + # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks/application bundle + # NOTE : it's not required to link agains SFML.framework + set_target_properties(SFML PROPERTIES + BUILD_WITH_INSTALL_RPATH 1 + INSTALL_NAME_DIR "@executable_path/../Frameworks") + # install rule install(TARGETS SFML FRAMEWORK DESTINATION ${CMAKE_INSTALL_FRAMEWORK_PREFIX} diff --git a/cmake/Macros.cmake b/cmake/Macros.cmake index 83be942e2..348c918e6 100644 --- a/cmake/Macros.cmake +++ b/cmake/Macros.cmake @@ -150,7 +150,7 @@ macro(sfml_add_library target) MACOSX_FRAMEWORK_BUNDLE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) endif() - # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks + # adapt install directory to allow distributing dylibs/frameworks in user’s frameworks/application bundle set_target_properties(${target} PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@executable_path/../Frameworks")