From 0c8991a5214ad73bccdf6e169aa4c575c80f0e90 Mon Sep 17 00:00:00 2001 From: Aki Date: Sat, 14 Jan 2023 23:08:22 +0100 Subject: Added CMAKE_INSTALL_PREFIX --- toolchain.cmake.in | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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) -- cgit v1.1