diff options
-rw-r--r-- | toolchain.cmake.in | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/toolchain.cmake.in b/toolchain.cmake.in index ba349b8..fb5a37c 100644 --- a/toolchain.cmake.in +++ b/toolchain.cmake.in @@ -1,4 +1,5 @@ set(MINGW_TOOLCHAIN @MINGW_TOOLCHAIN@) +set(MINGW_ROOT "/usr/${MINGW_TOOLCHAIN}") set(CMAKE_CROSSCOMPILING ON) set(CMAKE_SYSTEM_NAME Windows) @@ -14,8 +15,13 @@ set(CMAKE_READELF "${MINGW_TOOLCHAIN}-readelf") set(CMAKE_FIND_ROOT_PATH "/usr/${MINGW_TOOLCHAIN}") set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) -set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) +set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${MINGW_ROOT}") +endif() find_program(WINE wine) if(WINE) |