From 2ded28f6aaf8da8ab6d069f3125e4eb53fdd58a9 Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Mon, 3 Aug 2015 19:21:35 +0200 Subject: [PATCH] OS X: reintroduce packaging code It's much simpler now thanks to bundle utilities with @rpath support. --- CMakeLists.txt | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a14beb423..f7c458da5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -736,13 +736,18 @@ if (APPLE) install(CODE " set(BU_CHMOD_BUNDLE_ITEMS ON) - include(BundleUtilities) + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}) + include(BundleUtilitiesWithRPath) " COMPONENT Runtime) - #For now, search unresolved dependencies only in default system paths, so if you put unresolveable (i.e. with @executable_path in id name) lib or framework somewhere else, it would fail - set(DIRS "") + set(DIRS "${CMAKE_PREFIX_PATH}/lib") - include(CPack) + install(CODE " + cmake_policy(SET CMP0009 OLD) + fixup_bundle(\"${OPENMW_APP}\" \"\" \"${DIRS}\") + fixup_bundle(\"${OPENCS_APP}\" \"\" \"${DIRS}\") + " COMPONENT Runtime) + include(CPack) endif (APPLE) # Doxygen Target -- simply run 'make doc' or 'make doc_pages'