diff --git a/mingw.cmake b/mingw.cmake index c7cca00..c12fb90 100644 --- a/mingw.cmake +++ b/mingw.cmake @@ -1,4 +1,17 @@ +# toolchain-mingw64.cmake set(CMAKE_SYSTEM_NAME Windows) +set(CMAKE_SYSTEM_PROCESSOR x86_64) + +# specify the cross compiler set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc) set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++) set(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres) + +# 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) \ No newline at end of file