1 # Toolchain configuration for SUSE/Fedora like MinGW32 setup
3 # the name of the target operating system
4 SET(CMAKE_SYSTEM_NAME Windows)
6 # which compilers to use for C and C++
7 SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
8 SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
9 SET(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
10 SET(CMAKE_AR i686-w64-mingw32-ar)
11 SET(CMAKE_LD i686-w64-mingw32-ld)
12 SET(CMAKE_NM i686-w64-mingw32-nm)
13 SET(CMAKE_OBJCOPY i686-w64-mingw32-objcopy)
14 SET(CMAKE_OBJDUMP i686-w64-mingw32-objdump)
15 SET(CMAKE_RANLIB i686-w64-mingw32-ranlib)
16 SET(CMAKE_STRIP i686-w64-mingw32-strip)
17 SET(CMAKE_MC i686-w64-mingw32-windmc)
19 # here is the target environment located
20 SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32/sys-root/mingw/ /usr/i686-pc-mingw32/sys-root/mingw/ /home/mcihar/win-cross/crosscompiled)
22 SET(CMAKE_RC_COMPILE_OBJECT
23 "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -O coff -o <OBJECT> <SOURCE>")
25 # adjust the default behaviour of the FIND_XXX() commands:
26 # search headers and libraries in the target environment, search
27 # programs in the host environment
28 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
29 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
30 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
32 # Windows libraries names
33 set(WIN_LIB_ICONV) # builtin
34 set(WIN_LIB_INTL libintl-8.dll)
35 set(WIN_LIB_CURL libcurl-4.dll libidn-11.dll libnspr4.dll nss3.dll libssh2-1.dll ssl3.dll zlib1.dll nssutil3.dll libplc4.dll libplds4.dll libgcrypt-11.dll libgpg-error-0.dll)
36 set(WIN_LIB_MYSQL libmysql.dll)
37 set(WIN_LIB_PGSQL libpq.dll)
38 set(WIN_LIB_GLIB libglib-2.0-0.dll libgobject-2.0-0.dll libiconv-2.dll libgthread-2.0-0.dll)
40 # Disable pkg-config lookups
41 set(PKG_CONFIG_EXECUTABLE /bin/false)