2017-12-04 22:36:26 +01:00
|
|
|
# this one is important
|
|
|
|
SET(CMAKE_SYSTEM_NAME Linux)
|
2019-01-09 21:48:01 +01:00
|
|
|
SET(CMAKE_SYSTEM_PROCESSOR armhf)
|
2017-12-04 22:36:26 +01:00
|
|
|
|
|
|
|
# specify the cross compiler
|
|
|
|
SET(CMAKE_C_COMPILER /usr/bin/arm-linux-gnueabihf-gcc)
|
|
|
|
## for c++ support `install g++-arm-linux-gnueabihf`
|
|
|
|
#SET(CMAKE_CXX_COMPILER /usr/bin/arm-linux-gnueabihf-g++)
|
|
|
|
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
2019-01-09 21:48:01 +01:00
|
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
|
|
|
|
|
|
|
|
# set the architecture for CPack (i.e packageing)
|
|
|
|
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armhf)
|