toolchain.cmake 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # the name of the target operating system
  2. SET(CMAKE_SYSTEM_NAME Windows)
  3. # toolchain prefix, can be overridden by -DTOOLCHAIN=...
  4. # IF (NOT TOOLCHAIN)
  5. SET(TOOLCHAIN "i686-w64-mingw32-")
  6. # ENDIF()
  7. # which compilers to use for C and C++
  8. SET(CMAKE_C_COMPILER ${TOOLCHAIN}gcc)
  9. SET(CMAKE_CXX_COMPILER ${TOOLCHAIN}g++)
  10. SET(CMAKE_RC_COMPILER ${TOOLCHAIN}windres)
  11. SET(CMAKE_INSTALL_PREFIX ./win)
  12. SET(CMAKE_BUILD_TYPE None)
  13. SET(CMAKE_C_FLAGS -O3 -Wall)
  14. SET(CMAKE_CXX_FLAGS -O3 -Wall)
  15. SET(SDLIMAGE_INCLUDE_DIR ../libs/include/SDL)
  16. SET(SDLMIXER_INCLUDE_DIR ../libs/include/SDL)
  17. SET(SDLNET_INCLUDE_DIR ../libs/include/SDL)
  18. SET(SDLTTF_INCLUDE_DIR ../libs/include/SDL)
  19. SET(SDL_INCLUDE_DIR ../libs/include/SDL)
  20. SET(ENABLE_MANASERV OFF)
  21. # here is the target environment located
  22. SET(CMAKE_FIND_ROOT_PATH /home/mingw/cross/i686-w64-mingw32 /../libs/lib )
  23. # adjust the default behaviour of the FIND_XXX() commands:
  24. # search headers and libraries in the target environment, search
  25. # programs in the host environment
  26. set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  27. set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  28. set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)