mingw: export CXX and CC variables to the previously defined compilers

This commit is contained in:
Danny Robson 2019-06-28 10:32:13 +10:00
parent 122902736c
commit 0701b07ad5

View File

@ -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}")