forked from hirotakaster/pcl-superbuild
-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup-project-variables.cmake
54 lines (50 loc) · 2.72 KB
/
setup-project-variables.cmake
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
find_package(PythonInterp REQUIRED)
find_package(Git REQUIRED)
option(BUILD_ANDROID "Build for Android" ON)
option(BUILD_IOS_DEVICE "Build for iOS device" OFF)
option(BUILD_IOS_SIMULATOR "Build for iOS simulator" OFF)
option(BUILD_IOS_SIMULATOR_X86_64 "Build for iOS simulator(x86_64)" OFF)
option(BUILD_IOS_SIMULATOR_I386 "Build for iOS simulator(i386)" OFF)
option(BUILD_IOS_DEVICE_ARM64 "Build for iOS device(arm64)" OFF)
option(BUILD_IOS_DEVICE_ARMV7 "Build for iOS device(armv7)" OFF)
option(BUILD_IOS_DEVICE_ARMV7S "Build for iOS device(armv7s)" OFF)
# set ccache options
option(CCACHE_ENABLE "If the command ccache is avilable, use it for compile." ON)
find_program(CCACHE_EXE ccache)
if(CCACHE_EXE)
if(CCACHE_ENABLE)
message(STATUS "Enable ccache")
if(CMAKE_C_COMPILER_LAUNCHER)
set(CMAKE_C_COMPILER_LAUNCHER "${CMAKE_C_COMPILER_LAUNCHER}" "${CCACHE_EXE}")
else()
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_EXE}")
endif()
if(CMAKE_CXX_COMPILER_LAUNCHER)
set(CMAKE_CXX_COMPILER_LAUNCHER "${CMAKE_CXX_COMPILER_LAUNCHER}" "${CCACHE_EXE}")
else()
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXE}")
endif()
endif()
endif()
set(toolchain_dir ${CMAKE_SOURCE_DIR}/toolchains)
set(toolchain_ios_simulator ${toolchain_dir}/iOS_Simulator.cmake)
set(toolchain_ios_simulator_x86_64 ${toolchain_dir}/iOS_Simulator_x86_64.cmake)
# iOS min Target from 8.0 to 10.3?
set(toolchain_ios_simulator_i386 ${toolchain_dir}/iOS_Simulator_i386.cmake)
set(toolchain_ios_device ${toolchain_dir}/iOS_Device.cmake)
set(toolchain_ios_device_arm64 ${toolchain_dir}/iOS_Device_ARM64.cmake)
set(toolchain_ios_device_armv7 ${toolchain_dir}/iOS_Device_ARMv7.cmake)
set(toolchain_ios_device_armv7s ${toolchain_dir}/iOS_Device_ARMv7s.cmake)
# use Android NDK cmake file
set(toolchain_android $ENV{ANDROID_NDK}/build/cmake/android.toolchain.cmake)
set(try_run_results_vtk_ios_simulator ${toolchain_dir}/vtk-try-run-results.cmake)
set(try_run_results_vtk_ios_device ${toolchain_dir}/vtk-try-run-results.cmake)
set(try_run_results_vtk_android ${toolchain_dir}/vtk-try-run-results.cmake)
set(try_run_results_pcl_ios_simulator ${toolchain_dir}/pcl-try-run-results.cmake)
set(try_run_results_pcl_ios_simulator_x86_64 ${toolchain_dir}/pcl-try-run-results.cmake)
set(try_run_results_pcl_ios_simulator_i386 ${toolchain_dir}/pcl-try-run-results.cmake)
set(try_run_results_pcl_ios_device ${toolchain_dir}/pcl-try-run-results.cmake)
set(try_run_results_pcl_ios_device_arm64 ${toolchain_dir}/pcl-try-run-results.cmake)
set(try_run_results_pcl_ios_device_armv7 ${toolchain_dir}/pcl-try-run-results.cmake)
set(try_run_results_pcl_ios_device_armv7s ${toolchain_dir}/pcl-try-run-results.cmake)
set(try_run_results_pcl_android ${toolchain_dir}/pcl-try-run-results.cmake)