Toolchain-mingw32.cmake 1.1 KB

123456789101112131415161718192021
  1. # the name of the target operating system
  2. SET(CMAKE_SYSTEM_NAME Windows)
  3. # which compilers to use for C and C++
  4. SET(CMAKE_C_COMPILER i486-mingw32-gcc)
  5. SET(CMAKE_CXX_COMPILER i486-mingw32-g++)
  6. SET(CMAKE_RC_COMPILER i486-mingw32-windres)
  7. # here is the target environment located, please replace /path/to/Polycode with the absolute path to your polycode installation
  8. SET(POLYCODE_DIRECTORY "/path/to/Polycode")
  9. SET(CMAKE_FIND_ROOT_PATH /usr/i486-mingw32; ${POLYCODE_DIRECTORY}/Release/Windows/Framework/Core/Dependencies; ${POLYCODE_DIRECTORY}/Release/Windows/Framework/Tools/Dependencies; /home/cib/projects/Polycode/Release/Windows/Framework/Modules/Dependencies; )
  10. # adjust the default behaviour of the FIND_XXX() commands:
  11. # search headers and libraries in the target environment, search
  12. # programs in the host environment
  13. set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  14. set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  15. set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  16. # Paste the below into the relevant cmake files.
  17. #set(CMAKE_CXX_FLAGS "-D_WINDOWS -D_MINGW -D_WIN32 -DWIN32 -D__MINGW__")