Toolchain-x32.cmake 509 B

12345678910111213141516171819202122
  1. # toolchain file for building a 32bit version on a 64bit host
  2. # Add additional 32-bit libraries
  3. # sudo apt-get install g++-multilib libc6-dev-i386
  4. #TO-DO
  5. # Install QT5 32bit
  6. SET(CROSSROOT $ENV{HOME}/crosscompile)
  7. SET(QT_BIN_PATH ${CROSSROOT}/x86_32-linux-gnu/qt5/bin)
  8. set(CMAKE_SYSTEM_NAME Linux)
  9. set(CMAKE_SYSTEM_VERSION 1)
  10. set(CMAKE_SYSTEM_PROCESSOR "i686")
  11. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
  12. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")