summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2023-01-14 23:08:22 +0100
committerAki <please@ignore.pl>2023-01-14 23:08:22 +0100
commit0c8991a5214ad73bccdf6e169aa4c575c80f0e90 (patch)
tree2ef6be50582ae7e7610d0482ad417635d0e2d432
parentc0e7ca54dda44bce23109451fee8b0848a96ad05 (diff)
downloadmingw-w64-cmake-toolchains-0c8991a5214ad73bccdf6e169aa4c575c80f0e90.zip
mingw-w64-cmake-toolchains-0c8991a5214ad73bccdf6e169aa4c575c80f0e90.tar.gz
mingw-w64-cmake-toolchains-0c8991a5214ad73bccdf6e169aa4c575c80f0e90.tar.bz2
Added CMAKE_INSTALL_PREFIX
-rw-r--r--toolchain.cmake.in8
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)