-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathbootstrap.cmake
executable file
·45 lines (40 loc) · 1.96 KB
/
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
cmake_minimum_required (VERSION 3.6)
set(SOS_TOOLCHAIN_CMAKE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include(${SOS_TOOLCHAIN_CMAKE_PATH}/sos-sdk.cmake)
option(CLONE "Clone SDK Libraries" ON)
option(BUILD "Build SDK Libraries " ON)
if(CLONE)
file(REMOVE_RECURSE ../sgfx)
file(REMOVE_RECURSE ../StratifyOS-mbedtls)
file(REMOVE_RECURSE ../StratifyOS-jansson)
file(REMOVE_RECURSE ../StratifyAPI)
file(REMOVE_RECURSE ../UsbAPI)
file(REMOVE_RECURSE ../StratifyOS-libusb)
file(REMOVE_RECURSE ../CloudAPI)
file(REMOVE_RECURSE ../ServiceAPI)
file(REMOVE_RECURSE ../sl)
cmsdk_clone(https://github.com/StratifyLabs/sgfx.git ..)
cmsdk_clone(https://github.com/StratifyLabs/StratifyOS-mbedtls.git ..)
cmsdk_clone(https://github.com/StratifyLabs/StratifyOS-jansson.git ..)
cmsdk_clone(https://github.com/StratifyLabs/StratifyAPI.git ..)
cmsdk_clone(https://github.com/StratifyLabs/UsbAPI.git ..)
cmsdk_clone(https://github.com/StratifyLabs/StratifyOS-libusb.git ..)
cmsdk_clone(ssh://[email protected]/StratifyLabs/CloudAPI.git ..)
cmsdk_clone(ssh://[email protected]/StratifyLabs/ServiceAPI.git ..)
cmsdk_clone(ssh://[email protected]/tyler-gilbert/sl.git ..)
endif()
if(BUILD)
cmsdk_build_lib(. ON link)
cmsdk_build_lib(../sgfx ON link)
execute_process(COMMAND cmake -P bootstrap.cmake WORKING_DIRECTORY ../StratifyOS-mbedtls)
execute_process(COMMAND cp -f ../StratifyOS-mbedtls/config/mbedtls/config.h ../StratifyOS-mbedtls/mbedtls/include/mbedtls/config.h)
cmsdk_build_lib(../StratifyOS-mbedtls ON link)
execute_process(COMMAND cmake -P bootstrap.cmake WORKING_DIRECTORY ../StratifyOS-jansson)
cmsdk_build_lib(../StratifyOS-jansson ON link)
cmsdk_build_lib(../StratifyAPI ON link)
cmsdk_build_lib(../CloudAPI ON link)
cmsdk_build_lib(../ServiceAPI ON link)
execute_process(COMMAND cmake -P bootstrap.cmake WORKING_DIRECTORY ../StratifyOS-libusb)
cmsdk_build_lib(../UsbAPI ON link)
cmsdk_build_lib(../sl ON link)
endif()