XCompile.txt 915 B

123456789101112131415161718192021222324
  1. # Cross-compiling requires CMake 2.6 or newer. To cross-compile, first modify
  2. # this file to set the proper settings and paths. Then use it from build/ like:
  3. # cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt \
  4. # -DCMAKE_INSTALL_PREFIX=/usr/mingw32/mingw
  5. # If you already have a toolchain file setup, you may use that instead of this
  6. # file.
  7. # the name of the target operating system
  8. SET(CMAKE_SYSTEM_NAME Windows)
  9. # which compilers to use for C and C++
  10. SET(CMAKE_C_COMPILER mingw32-gcc)
  11. SET(CMAKE_CXX_COMPILER mingw32-g++)
  12. # here is the target environment located
  13. SET(CMAKE_FIND_ROOT_PATH /usr/mingw32/mingw)
  14. # adjust the default behaviour of the FIND_XXX() commands:
  15. # search headers and libraries in the target environment, search
  16. # programs in the host environment
  17. set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  18. set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  19. set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)