]> git.mxchange.org Git - flightgear.git/commitdiff
RPATH handling for Mac.
authorJames Turner <zakalawe@mac.com>
Sun, 7 Jun 2015 15:20:30 +0000 (17:20 +0200)
committerJames Turner <zakalawe@mac.com>
Mon, 8 Jun 2015 09:37:26 +0000 (10:37 +0100)
CMakeLists.txt

index 3dfb9a2a0f51bf62a1dc7b712af84d1d539c0b37..4808f9d7fccece0757ed5efee4f752c16d505da0 100644 (file)
@@ -14,9 +14,16 @@ if(COMMAND cmake_policy)
    endif()
 endif()
 
-# using 10.7 because boost requires libc++ and 10.6 doesn't include it
-set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
-set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
+if(APPLE)
+       # using 10.7 because boost requires libc++ and 10.6 doesn't include it
+       set(CMAKE_OSX_DEPLOYMENT_TARGET 10.7)
+       set(CMAKE_OSX_SYSROOT /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk)
+
+       set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
+       # when building, don't use the install RPATH already
+       # (but later on when installing)
+       SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+endif()
 
 project(FlightGear)