summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/cmake/setup-hook.sh
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-14 23:33:03 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2018-05-14 23:33:03 -0400
commit5e17335bd7ff853379122e08dadfaa2fc1c020b7 (patch)
tree911e75d700bebef1aa60fedcaa6a29b5032d6428 /pkgs/development/tools/build-managers/cmake/setup-hook.sh
parent330ca731e88ec015181c43d92ae8f7c77cf0226a (diff)
parent0fc21a364bfd6b2dea9010fdf21415ff3de1805a (diff)
downloadnixlib-5e17335bd7ff853379122e08dadfaa2fc1c020b7.tar
nixlib-5e17335bd7ff853379122e08dadfaa2fc1c020b7.tar.gz
nixlib-5e17335bd7ff853379122e08dadfaa2fc1c020b7.tar.bz2
nixlib-5e17335bd7ff853379122e08dadfaa2fc1c020b7.tar.lz
nixlib-5e17335bd7ff853379122e08dadfaa2fc1c020b7.tar.xz
nixlib-5e17335bd7ff853379122e08dadfaa2fc1c020b7.tar.zst
nixlib-5e17335bd7ff853379122e08dadfaa2fc1c020b7.zip
Merge remote-tracking branch 'upstream/staging' into strictDeps
Diffstat (limited to 'pkgs/development/tools/build-managers/cmake/setup-hook.sh')
-rwxr-xr-xpkgs/development/tools/build-managers/cmake/setup-hook.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/cmake/setup-hook.sh b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
index 003f900c9541..733dd9482200 100755
--- a/pkgs/development/tools/build-managers/cmake/setup-hook.sh
+++ b/pkgs/development/tools/build-managers/cmake/setup-hook.sh
@@ -41,6 +41,20 @@ cmakeConfigurePhase() {
     cmakeFlags="-DCMAKE_RANLIB=$(command -v $RANLAB) $cmakeFlags"
     cmakeFlags="-DCMAKE_STRIP=$(command -v $STRIP) $cmakeFlags"
 
+    # on macOS we want to prefer Unix-style headers to Frameworks
+    # because we usually do not package the framework
+    cmakeFlags="-DCMAKE_FIND_FRAMEWORK=last $cmakeFlags"
+
+    # we never want to use the global macOS SDK
+    cmakeFlags="-DCMAKE_OSX_SYSROOT= $cmakeFlags"
+
+    # disable OSX deployment target
+    # we don't want our binaries to have a "minimum" OSX version
+    cmakeFlags="-DCMAKE_OSX_DEPLOYMENT_TARGET= $cmakeFlags"
+
+    # correctly detect our clang compiler
+    cmakeFlags="-DCMAKE_POLICY_DEFAULT_CMP0025=NEW $cmakeFlags"
+
     # This installs shared libraries with a fully-specified install
     # name. By default, cmake installs shared libraries with just the
     # basename as the install name, which means that, on Darwin, they