🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
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.

37 lines
1.5 KiB

  1. # Cross-compiling requires CMake 2.6 or newer. Example:
  2. # cmake .. -DCMAKE_TOOLCHAIN_FILE=../XCompile.txt -DHOST=i686-w64-mingw32
  3. # Where 'i686-w64-mingw32' is the host prefix for your cross-compiler. If you
  4. # already have a toolchain file setup, you may use that instead of this file.
  5. # the name of the target operating system
  6. SET(CMAKE_SYSTEM_NAME Windows)
  7. # which compilers to use for C and C++
  8. SET(CMAKE_C_COMPILER "${HOST}-gcc")
  9. SET(CMAKE_CXX_COMPILER "${HOST}-g++")
  10. SET(CMAKE_RC_COMPILER "${HOST}-windres")
  11. # here is the target environment located
  12. SET(CMAKE_FIND_ROOT_PATH "/usr/${HOST}")
  13. # here is where stuff gets installed to
  14. SET(CMAKE_INSTALL_PREFIX "${CMAKE_FIND_ROOT_PATH}" CACHE STRING "Install path prefix, prepended onto install directories." FORCE)
  15. # adjust the default behaviour of the FIND_XXX() commands:
  16. # search headers and libraries in the target environment, search
  17. # programs in the host environment
  18. set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
  19. set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
  20. set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
  21. # set env vars so that pkg-config will look in the appropriate directory for
  22. # .pc files (as there seems to be no way to force using ${HOST}-pkg-config)
  23. set(ENV{PKG_CONFIG_LIBDIR} "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig")
  24. set(ENV{PKG_CONFIG_PATH} "")
  25. # Qt4 tools
  26. SET(QT_QMAKE_EXECUTABLE ${HOST}-qmake)
  27. SET(QT_MOC_EXECUTABLE ${HOST}-moc)
  28. SET(QT_RCC_EXECUTABLE ${HOST}-rcc)
  29. SET(QT_UIC_EXECUTABLE ${HOST}-uic)
  30. SET(QT_LRELEASE_EXECUTABLE ${HOST}-lrelease)