From 0701b07ad52c271e4e7cc4111891f0f732e12ee3 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Fri, 28 Jun 2019 10:32:13 +1000 Subject: [PATCH] mingw: export CXX and CC variables to the previously defined compilers --- mingw.toolchain | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mingw.toolchain b/mingw.toolchain index 9e19352..9adb979 100644 --- a/mingw.toolchain +++ b/mingw.toolchain @@ -25,4 +25,8 @@ if (NOT "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows") set (CMAKE_CROSSCOMPILING_EMULATOR "${WINE}") endif () -set (CMAKE_CROSSCOMPILING_EMULATOR "${WINE}") +# Export the chosen compiler via CXX and CC, because it's entirely possible +# one of child build scripts will call out to something that relies on these +# to discover the compiler (or will otherwise choose the wrong one). +set ($ENV{CXX} "${CMAKE_CXX_COMPILER}") +set ($ENV{CC} "${CMAKE_C_COMPILER}")