File: Windows32.cmake

package info (click to toggle)
hdrmerge 0.5%2Bgit20200117-4.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 33,936 kB
  • sloc: cpp: 5,043; sh: 175; makefile: 5
file content (29 lines) | stat: -rw-r--r-- 1,034 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# This is an example toolchain file to cross-compile for Windows 32-bit targets.
# It is based on the Debian's mingw-w64 package.

# this one is important
SET(CMAKE_SYSTEM_NAME Windows)
SET(WIN_ARCH "")

# specify the cross compiler
SET(CMAKE_C_COMPILER   /usr/bin/i686-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER  /usr/bin/i686-w64-mingw32-windres)

# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32 ${PREFIX})

# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search 
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

# Some flags so that FindQt4.cmake finds the correct libs
if(QT_ROOT)
	set(QT_QTCORE_LIBRARY_RELEASE ${QT_ROOT}/lib/libQtCore4.a)
	set(QT_QTCORE_INCLUDE_DIR ${QT_ROOT}/include/QtCore)
	set(QT_HEADERS_DIR ${QT_ROOT}/include)
endif(QT_ROOT)