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