| 1 |
#!/bin/bash |
| 2 |
# assume directory is root of downloaded repo |
| 3 |
mkdir cmake |
| 4 |
cd cmake |
| 5 |
ls -al |
| 6 |
|
| 7 |
# Create a cmake toolchain file on the fly |
| 8 |
echo "SET(CMAKE_SYSTEM_NAME Linux) # this one is important" > toolchain.cmake |
| 9 |
echo "SET(CMAKE_SYSTEM_VERSION 1) # this one not so much" >> toolchain.cmake |
| 10 |
|
| 11 |
echo "SET(CMAKE_C_COMPILER ${TOOLCHAIN_EXES}/${TOOLCHAIN_NAME}-gcc)" >> toolchain.cmake |
| 12 |
echo "SET(CMAKE_CXX_COMPILER ${TOOLCHAIN_EXES}/${TOOLCHAIN_NAME}-g++)" >> toolchain.cmake |
| 13 |
echo "SET(CMAKE_FIND_ROOT_PATH ${TOOLCHAIN_SYSROOT})" >> toolchain.cmake |
| 14 |
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> toolchain.cmake |
| 15 |
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> toolchain.cmake |
| 16 |
echo "SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> toolchain.cmake |
| 17 |
ls -al |
| 18 |
|
| 19 |
# Build the SDK. This will use the OpenSSL, cURL and uuid binaries that we built before |
| 20 |
cmake -DCMAKE_TOOLCHAIN_FILE=toolchain.cmake -Duse_prov_client=OFF -DCMAKE_INSTALL_PREFIX=${TOOLCHAIN_PREFIX} -Drun_e2e_tests=ON -Drun_unittests=ON .. |
| 21 |
make -j 2 |
| 22 |
ls -al |