Ubuntu-MinGW-W64.cmake 686 B

123456789101112131415161718
  1. # Toolchain for Ubuntu MinGw compiler shipped with the mingw-w64 and
  2. # g++-mingw-w64 packages
  3. SET(TOOLCHAIN_PREFIX ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32)
  4. set(CMAKE_C_COMPILER ${TOOLCHAIN_PREFIX}-gcc)
  5. set(CMAKE_CXX_COMPILER ${TOOLCHAIN_PREFIX}-g++)
  6. set(CMAKE_RC_COMPILER ${TOOLCHAIN_PREFIX}-windres)
  7. set(CMAKE_FIND_ROOT_PATH /usr/${TOOLCHAIN_PREFIX})
  8. SET(ENV{PKG_CONFIG} /usr/bin/${TOOLCHAIN_PREFIX}-pkg-config)
  9. IF(WIN64)
  10. SET(TOOLCHAIN_PREFIX32 ${CMAKE_SYSTEM_PROCESSOR32}-w64-mingw32)
  11. SET(CMAKE_C_COMPILER32 ${TOOLCHAIN_PREFIX32}-gcc)
  12. SET(CMAKE_CXX_COMPILER32 ${TOOLCHAIN_PREFIX32}-g++)
  13. ENDIF()
  14. INCLUDE(${CMAKE_CURRENT_LIST_DIR}/WinCrossCompile.cmake)