File: mingw64-cross.cmake

package info (click to toggle)
tinyobjloader 2.0.0~rc13%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,488 kB
  • sloc: cpp: 7,029; python: 120; sh: 57; makefile: 45
file content (20 lines) | stat: -rw-r--r-- 681 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
SET(CMAKE_SYSTEM_NAME Windows)

IF (DEFINED ENV{MINGW_GCC_DIR})
  SET(MINGW_GCC_ROOT "$ENV{MINGW_GCC_DIR}")
ELSE ()
  # Assume mingw cross compiler is installed in your system
  SET(MINGW_GCC_ROOT "/usr")
ENDIF()

# win32 may fail to compile with C++11 threads.

SET(CMAKE_C_COMPILER ${MINGW_GCC_ROOT}/bin/x86_64-w64-mingw32-gcc-posix)
SET(CMAKE_CXX_COMPILER ${MINGW_GCC_ROOT}/bin/x86_64-w64-mingw32-g++-posix)
SET(CMAKE_RC_COMPILER ${MINGW_GCC_ROOT}/bin/x86_64-w64-mingw32-windres)

SET(CMAKE_FIND_ROOT_PATH ${MINGW_GCC_ROOT}/x86_64-w64-mingw32)

SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)