diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile index dfb0f3cb4..ce74de184 100644 --- a/contrib/depends/Makefile +++ b/contrib/depends/Makefile @@ -68,21 +68,6 @@ $(host_arch)_$(host_os)_prefix=$(BASEDIR)/$(host) $(host_arch)_$(host_os)_host=$(host) host_prefix=$($(host_arch)_$(host_os)_prefix) build_prefix=$(host_prefix)/native -ifeq ($(host_os),mingw32) -host_cmake=Windows -endif -ifeq ($(host_os),linux) -host_cmake=Linux -endif -ifeq ($(host_os),freebsd) -host_cmake=FreeBSD -endif -ifeq ($(host_os),darwin) -host_cmake=Darwin -endif -ifeq ($(host_os),android) -host_cmake=Android -endif AT_$(V):= AT_:=@ @@ -151,7 +136,7 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_ -e 's|@debug@|$(DEBUG)|' \ -e 's|@release_type@|$(release_type)|' \ -e 's|@build_tests@|$(build_tests)|' \ - -e 's|@depends@|$(host_cmake)|' \ + -e 's|@cmake_system_name@|$($(host_os)_cmake_system)|' \ -e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\ -e 's|@arch@|$(host_arch)|'\ $< > $@ diff --git a/contrib/depends/hosts/android.mk b/contrib/depends/hosts/android.mk index d6f8b99dd..b08126e86 100644 --- a/contrib/depends/hosts/android.mk +++ b/contrib/depends/hosts/android.mk @@ -20,3 +20,4 @@ android_debug_CXXFLAGS=$(android_debug_CFLAGS) android_native_toolchain=android_ndk +android_cmake_system=Android diff --git a/contrib/depends/hosts/darwin.mk b/contrib/depends/hosts/darwin.mk index d81fd4241..9a96e2601 100644 --- a/contrib/depends/hosts/darwin.mk +++ b/contrib/depends/hosts/darwin.mk @@ -19,3 +19,5 @@ darwin_debug_CFLAGS=-O1 darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS) darwin_native_toolchain=native_cctools darwin_sdk + +darwin_cmake_system=Darwin diff --git a/contrib/depends/hosts/freebsd.mk b/contrib/depends/hosts/freebsd.mk index 2e3b5933e..d3c6c6149 100644 --- a/contrib/depends/hosts/freebsd.mk +++ b/contrib/depends/hosts/freebsd.mk @@ -16,3 +16,4 @@ freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS) freebsd_native_toolchain=freebsd_base +freebsd_cmake_system=FreeBSD diff --git a/contrib/depends/hosts/linux.mk b/contrib/depends/hosts/linux.mk index 912fdb03c..0f9379f4a 100644 --- a/contrib/depends/hosts/linux.mk +++ b/contrib/depends/hosts/linux.mk @@ -30,3 +30,5 @@ i686_linux_CXX=$(default_host_CXX) -m32 x86_64_linux_CC=$(default_host_CC) -m64 x86_64_linux_CXX=$(default_host_CXX) -m64 endif + +linux_cmake_system=Linux diff --git a/contrib/depends/hosts/mingw32.mk b/contrib/depends/hosts/mingw32.mk index ccc4c5082..58a9a929d 100644 --- a/contrib/depends/hosts/mingw32.mk +++ b/contrib/depends/hosts/mingw32.mk @@ -9,3 +9,5 @@ mingw32_debug_CFLAGS=-O1 mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS) mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC + +mingw32_cmake_system=Windows diff --git a/contrib/depends/toolchain.cmake.in b/contrib/depends/toolchain.cmake.in index 6fe4618ae..e44882f4c 100644 --- a/contrib/depends/toolchain.cmake.in +++ b/contrib/depends/toolchain.cmake.in @@ -1,5 +1,5 @@ # Set the system name to one of Android, Darwin, FreeBSD, Linux, or Windows -SET(CMAKE_SYSTEM_NAME @depends@) +SET(CMAKE_SYSTEM_NAME @cmake_system_name@) SET(CMAKE_SYSTEM_PROCESSOR @arch@) SET(CMAKE_BUILD_TYPE @release_type@)