0c1e1f9
SET(CMAKE_SYSTEM_NAME Windows)
475f0ff
SET(CMAKE_SYSTEM_PROCESSOR x86_64)
0c1e1f9
0c1e1f9
# specify the cross compiler
0c1e1f9
SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)
0c1e1f9
SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)
0c1e1f9
0c1e1f9
# where is the target environment
0c1e1f9
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32/sys-root/mingw)
0c1e1f9
0c1e1f9
# search for programs in the build host directories
0c1e1f9
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
0c1e1f9
# for libraries and headers in the target directories
0c1e1f9
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
0c1e1f9
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
0c1e1f9
0c1e1f9
# Make sure Qt can be detected by CMake
0c1e1f9
SET(QT_BINARY_DIR /usr/x86_64-w64-mingw32/bin /usr/bin)
0c1e1f9
0c1e1f9
# set the resource compiler (RHBZ #652435)
0c1e1f9
SET(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres)
0c1e1f9
0c1e1f9
# These are needed for compiling lapack (RHBZ #753906)
0c1e1f9
SET(CMAKE_Fortran_COMPILER /usr/bin/x86_64-w64-mingw32-gfortran)
0c1e1f9
SET(CMAKE_AR:FILEPATH /usr/bin/x86_64-w64-mingw32-ar)
0c1e1f9
SET(CMAKE_RANLIB:FILEPATH /usr/bin/x86_64-w64-mingw32-ranlib)
0c1e1f9