forked from conan-io/conan-docker-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcmake-wrapper
More file actions
executable file
·37 lines (32 loc) · 1.1 KB
/
cmake-wrapper
File metadata and controls
executable file
·37 lines (32 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
ALL_ARGS=$@
BUILD=no
for i in "$@":
do
case $i in
--build)
BUILD=yes
;;
*)
;;
esac
done
# https://gitlab.kitware.com/cmake/cmake/issues/18739 Android: NDK r19 support
# https://github.com/conan-io/conan/issues/2402 Android and CONAN_LIBCXX do not play well together
# https://github.com/conan-io/conan/issues/4537 Pass ANDROID_ABI & ANDROID_NDK variables to cmake
# https://github.com/conan-io/conan/issues/4629 set(CMAKE_FIND_ROOT_PATH_MODE_* ONLY) when cross-compiling, for Android at least
if [ $BUILD == "yes" ]; then
cmake "$@"
else
cmake \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=$CMAKE_FIND_ROOT_PATH_MODE_PROGRAM \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=$CMAKE_FIND_ROOT_PATH_MODE_LIBRARY \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=$CMAKE_FIND_ROOT_PATH_MODE_INCLUDE \
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=$CMAKE_FIND_ROOT_PATH_MODE_PACKAGE \
-DANDROID_STL=$ANDROID_STL \
-DANDROID_NDK=$ANDROID_NDK \
-DANDROID_ABI=$ANDROID_ABI \
-DANDROID_PLATFORM=$ANDROID_PLATFORM \
-DANDROID_TOOLCHAIN=$ANDROID_TOOLCHAIN \
"$@"
fi