-
Notifications
You must be signed in to change notification settings - Fork 0
/
toolchain.cmake
18 lines (12 loc) · 792 Bytes
/
toolchain.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#this is required
SET(CMAKE_SYSTEM_NAME Linux)
#specify the cross compiler
SET(CMAKE_C_COMPILER ~/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-gcc)
SET(CMAKE_CXX_COMPILER ~/openwrt_widora/staging_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-g++)
#where is the target environment
SET(CMAKE_FIND_ROOT_PATH ~/openwrt_widora/build_dir/toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2/linux-ramips_mt7688/linux-3.18.29)
# search for programs in the build host directories (not necessary)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)