summaryrefslogtreecommitdiff
path: root/toolchain.cmake.in
diff options
context:
space:
mode:
Diffstat (limited to 'toolchain.cmake.in')
-rw-r--r--toolchain.cmake.in4
1 files changed, 3 insertions, 1 deletions
diff --git a/toolchain.cmake.in b/toolchain.cmake.in
index 00f58f1..5dd4cfb 100644
--- a/toolchain.cmake.in
+++ b/toolchain.cmake.in
@@ -25,5 +25,7 @@ set(CMAKE_INSTALL_PREFIX "${MINGW_ROOT}" CACHE PATH "Installation prefix")
find_program(MINGW_WINE wine)
if(MINGW_WINE)
- set(CMAKE_CROSSCOMPILING_EMULATOR ${MINGW_WINE})
+ set(MINGW_WINEPATH $ENV{WINEPATH})
+ list(PREPEND MINGW_WINEPATH "${MINGW_ROOT}/bin")
+ set(CMAKE_CROSSCOMPILING_EMULATOR ${CMAKE_COMMAND} -E env "WINEPATH='${MINGW_WINEPATH}'" ${MINGW_WINE})
endif()