From: Rosen Penev Date: Thu, 26 Nov 2020 00:08:57 +0000 (-0800) Subject: cmake.mk: set C/CXX compiler for host builds as well X-Git-Tag: v1.5.4-20201214~10 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1cb9efdb14b63ddb7946db32b617a5e7f62e6457;p=librecmc%2Flibrecmc.git cmake.mk: set C/CXX compiler for host builds as well Without this, cmake will use whatever CC/CXX is set to, which could be clang. In that case, at least libjson-c/host will fail to compile. Signed-off-by: Rosen Penev (cherry picked from commit f98878e4c17d5f11e78994b4fc456e6b60b2660f) --- diff --git a/include/cmake.mk b/include/cmake.mk index 75bf0d751c..e33d75d7ca 100644 --- a/include/cmake.mk +++ b/include/cmake.mk @@ -90,6 +90,8 @@ define Host/Configure/Default LDFLAGS="$(HOST_LDFLAGS)" \ cmake \ -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER="$(HOSTCC)" \ + -DCMAKE_CXX_COMPILER="$(HOSTCXX)" \ -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" \ -DCMAKE_EXE_LINKER_FLAGS:STRING="$(HOST_LDFLAGS)" \