#LINUX32 toolchain set(LINUX32 True) set(CMAKE_SYSTEM_NAME Linux) set(CMAKE_SYSTEM_VERSION 1) set(CMAKE_SYSTEM_PROCESSOR i686) # Cross-compiler set(CMAKE_C_COMPILER /usr/bin/gcc) set(CMAKE_CXX_COMPILER /usr/bin/g++) set(CMAKE_LINKER /usr/bin/ld) set(CMAKE_OBJCOPY /usr/bin/objcopy) set(CMAKE_FIND_ROOT_PATH /usr/lib/i386-linux-gnu /lib/i386-linux-gnu) set(CMAKE_LIBRARY_PATH /usr/lib/i386-linux-gnu) # Tell pkg-config to look for libraries set(ENV{PKG_CONFIG_PATH} "/usr/lib/i386-linux-gnu/pkgconfig") set(CMAKE_C_FLAGS "-m32 -fsigned-char -Wno-error=maybe-uninitialized -Wno-error=uninitialized -Wno-error=restrict -Wno-error=array-bounds -msse -msse2 -mfpmath=sse" CACHE STRING "C flags for Linux32") set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS}" CACHE STRING "c++ flags for Linux32") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c++ Release flags" ) set(CMAKE_C_FLAGS_RELEASE "-O3 -DNDEBUG" CACHE STRING "c Release flags" ) set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c++ Debug flags" ) set(CMAKE_C_FLAGS_DEBUG "-O0 -g -DDEBUG -D_DEBUG" CACHE STRING "c Debug flags" ) set(CMAKE_ASM_FLAGS "-m32") set(CMAKE_SKIP_RPATH 1) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32 -Wl,--enable-new-dtags,-R,\\\$ORIGIN" CACHE STRING "Flags executables") set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32 -Wl,--enable-new-dtags,-R,\\\$ORIGIN" CACHE STRING "Flags shared") set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32 -Wl,--enable-new-dtags,-R,\\\$ORIGIN" CACHE STRING "Flags modules") set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX} ${CMAKE_FIND_LIBRARY_SUFFIXES}) set(SCOL_INSTALL_PREFIX "linux32") add_definitions(-DLINUX)