-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.cmake
33 lines (22 loc) · 1008 Bytes
/
bootstrap.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
set(SDK_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/SDK)
set(DEPENDENCIES_DIRECTORY ${SDK_DIRECTORY}/dependencies)
file(MAKE_DIRECTORY ${DEPENDENCIES_DIRECTORY})
file(REMOVE_RECURSE ${DEPENDENCIES_DIRECTORY}/CMakeSDK)
message(STATUS "cloning CMakeSDK project")
execute_process(
COMMAND git clone --branch v2.1 https://github.com/StratifyLabs/CMakeSDK.git
WORKING_DIRECTORY ${DEPENDENCIES_DIRECTORY}
)
option(IS_ARM_CROSS_COMPILE "Setup the system to cross compile to Stratify OS" OFF)
# This is used on the CI server, but can be run locally as well
# This is currently NOT used with IS_ARM_CROSS_COMPILE=ON
option(IS_BUILD_AND_TEST "Build and run the API tests" OFF)
if(IS_ARM_CROSS_COMPILE)
set(BOOTSTRAP_SCRIPT sos-bootstrap)
else()
set(BOOTSTRAP_SCRIPT bootstrap)
endif()
message(STATUS "Running ${BOOTSTRAP_SCRIPT} using SDK path: ${SDK_DIRECTORY}")
execute_process(
COMMAND cmake -DCMSDK_SDK_PATH=${SDK_DIRECTORY} -P ${DEPENDENCIES_DIRECTORY}/CMakeSDK/scripts/${BOOTSTRAP_SCRIPT}.cmake
)