You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

  1. # This is a CMake toolchain file so we can run Mingw64 to build a Windows64 binaries.
  2. # http://vtk.org/Wiki/CMake_Cross_Compiling
  3. # usage
  4. # cmake -DCMAKE_TOOLCHAIN_FILE=./toolchain-mingw64.cmake ../
  5. set( CMAKE_SYSTEM_NAME Windows )
  6. set( CMAKE_SYSTEM_PROCESSOR x86_64 )
  7. #-----<configuration>-----------------------------------------------
  8. # configure only the lines within this <configure> block, typically
  9. set( TC_PATH /usr/bin )
  10. set( CROSS_COMPILE x86_64-w64-mingw32- )
  11. # specify the cross compiler
  12. set( CMAKE_C_COMPILER ${TC_PATH}/${CROSS_COMPILE}gcc )
  13. set( CMAKE_CXX_COMPILER ${TC_PATH}/${CROSS_COMPILE}g++ )
  14. set( CMAKE_RC_COMPILER ${TC_PATH}/${CROSS_COMPILE}windres )
  15. # where is the target environment
  16. set( CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32 )
  17. #-----</configuration>-----------------------------------------------
  18. # search for programs in the build host directories
  19. set( CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER )
  20. # for libraries and headers in the target directories
  21. set( CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY )
  22. set( CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY )