a62ef881ee6cc41f2a3f39fa97f5d32aa0e1f143
[cross.git] / i686-linux-gnu-4.7 / toolset.cmake
1 # Define our host system
2 SET(CMAKE_SYSTEM_NAME Linux)
3 SET(CMAKE_SYSTEM_VERSION 1)# Define the cross compiler locations
4 SET(CMAKE_C_COMPILER   /opt/cross/i686-linux-gnu-4.7/usr/bin/x86_64-linux-gnu-gcc-4.7)
5 SET(CMAKE_CXX_COMPILER /opt/cross/i686-linux-gnu-4.7/usr/bin/x86_64-linux-gnu-g++-4.7)
6 SET(CMAKE_FIND_ROOT_PATH /opt/cross/i686-linux-gnu-4.7/)
7
8 SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
9 # Search for libraries and headers in the target directories only
10 SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
11 SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
12 #add_definitions(-Wall -std=c11)
13 add_definitions(-Wall)
14 add_compile_options(-std=c++11)
15 add_compile_options(--sysroot=/opt/cross/i686-linux-gnu-4.7/)
16 #add_compile_options(-fPIC)
17 #add_compile_options(-DSHARED)
18 add_compile_options(-m32)
19 set( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -m32" )
20 set( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -std=c++11 --sysroot=/opt/cross/i686-linux-gnu-4.7/" )
21 #set( CMAKE_CXX_FLAGS  "${CMAKE_CXX_FLAGS} -print-search-dirs" )
22 set(CMAKE_LIBRARY_PATH /opt/cross/i686-linux-gnu-4.7/usr/lib/x86_64-linux-gnu/32)
23