X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=blobdiff_plain;f=cmake-crossbuild.txt;fp=cmake-crossbuild.txt;h=ce5d3003fbf0343958f060d443572fb78ca7f7c8;hp=0000000000000000000000000000000000000000;hb=78be9049849fdb308a204e102be664bee074fb18;hpb=fd1247a5edae6f466e9e2107ae6157e9db34f0a3 diff --git a/cmake-crossbuild.txt b/cmake-crossbuild.txt new file mode 100644 index 0000000000..ce5d3003fb --- /dev/null +++ b/cmake-crossbuild.txt @@ -0,0 +1,26 @@ +SET(CMAKE_SYSTEM_NAME Windows) +SET(CMAKE_SYSTEM_PROCESSOR x86_64) + +# specify the cross compiler +SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc) +SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++) + +# where is the target environment +SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32) + +# search for programs in the build host directories +SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +# for libraries and headers in the target directories +SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) + +# Make sure Qt can be detected by CMake +SET(QT_BINARY_DIR /usr/x86_64-w64-mingw32/bin /usr/bin) + +# set the resource compiler (RHBZ #652435) +SET(CMAKE_RC_COMPILER /usr/bin/x86_64-w64-mingw32-windres) + +# These are needed for compiling lapack (RHBZ #753906) +SET(CMAKE_Fortran_COMPILER /usr/bin/x86_64-w64-mingw32-gfortran) +SET(CMAKE_AR:FILEPATH /usr/bin/x86_64-w64-mingw32-ar) +SET(CMAKE_RANLIB:FILEPATH /usr/bin/x86_64-w64-mingw32-ranlib)