-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtoolchain.cmake
More file actions
31 lines (26 loc) · 2.16 KB
/
toolchain.cmake
File metadata and controls
31 lines (26 loc) · 2.16 KB
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
# CMake system name must be something like "Linux".
# This is important for cross-compiling.
set(CMAKE_SYSTEM_PROCESSOR )
set(CMAKE_C_COMPILER arm-fslc-linux-gnueabi-gcc)
set(CMAKE_CXX_COMPILER arm-fslc-linux-gnueabi-g++)
set(CMAKE_C_FLAGS " --sysroot=/home/strngr/yocto_sdk/sysroots/cortexa9t2hf-neon-fslc-linux-gnueabi -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security " CACHE STRING "CFLAGS")
set(CMAKE_CXX_FLAGS " --sysroot=/home/strngr/yocto_sdk/sysroots/cortexa9t2hf-neon-fslc-linux-gnueabi -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fpermissive" CACHE STRING "CXXFLAGS")
set(CMAKE_C_FLAGS_RELEASE " --sysroot=/home/strngr/yocto_sdk/sysroots/cortexa9t2hf-neon-fslc-linux-gnueabi -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -DNDEBUG" CACHE STRING "CFLAGS for release")
set(CMAKE_CXX_FLAGS_RELEASE " --sysroot=/home/strngr/yocto_sdk/sysroots/cortexa9t2hf-neon-fslc-linux-gnueabi -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -DNDEBUG" CACHE STRING "CXXFLAGS for release")
set(CMAKE_C_LINK_FLAGS "" CACHE STRING "LDFLAGS")
set(CMAKE_CXX_LINK_FLAGS "" CACHE STRING "LDFLAGS")
# only search in the paths provided so cmake doesnt pick
# up libraries and tools from the native build machine
set(CMAKE_FIND_ROOT_PATH /home/strngr/yocto_sdk/sysroots/cortexa9t2hf-neon-fslc-linux-gnueabi )
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Use qt.conf settings
set(ENV{QT_CONF_PATH} qt.conf)
# We need to set the rpath to the correct directory as cmake does not provide any
# directory as rpath by default
set(CMAKE_INSTALL_RPATH )
# Use native cmake modules
set(CMAKE_MODULE_PATH /cmake/Modules/)
# add for non /usr/lib libdir, e.g. /usr/lib64
set(CMAKE_LIBRARY_PATH ${libdir} ${base_libdir})