summarylogtreecommitdiffstats
path: root/apple-darwin-cmake.sh
blob: 290c105944eefd62227f2304dde6289e9fd3c5fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh
prefix=@PREFIX@

additional_args=" \
  -DCMAKE_INSTALL_PREFIX:PATH=${prefix} \
  -DCMAKE_INSTALL_LIBDIR:PATH=${prefix}/lib \
  -DINCLUDE_INSTALL_DIR:PATH=${prefix}/include \
  -DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES:PATH=${prefix}/include \
  -DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES:PATH=${prefix}/include \
  -DLIB_INSTALL_DIR:PATH=${prefix}/lib \
  -DSYSCONF_INSTALL_DIR:PATH=${prefix}/etc \
  -DSHARE_INSTALL_DIR:PATH=${prefix}/share \
  -DCMAKE_TOOLCHAIN_FILE=@OSXCROSSDIR@/share/apple-darwin/toolchain-@TRIPLE@.cmake"

[[ ! $PREVENT_FORCING_SHARED_LIBS ]] &&
  additional_args+=' -DBUILD_SHARED_LIBS:BOOL=ON' ||
  additional_args+=' -DBUILD_SHARED_LIBS:BOOL=OFF'

PATH="@OSXCROSSDIR@/bin:${prefix}/bin:$PATH" cmake $additional_args "$@"