aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortobtoht <tob@featherwallet.org>2023-09-26 16:37:29 +0200
committertobtoht <tob@featherwallet.org>2023-09-26 16:46:51 +0200
commit0d763a19b81b2740778685148021e32e3e9b6f3c (patch)
tree85375dc50eadb78e37985864c92b653a6c393965
parentMerge pull request #8976 (diff)
downloadmonero-0d763a19b81b2740778685148021e32e3e9b6f3c.tar.xz
depends: move cmake system config to hosts files
-rw-r--r--contrib/depends/Makefile17
-rw-r--r--contrib/depends/hosts/android.mk1
-rw-r--r--contrib/depends/hosts/darwin.mk2
-rw-r--r--contrib/depends/hosts/freebsd.mk1
-rw-r--r--contrib/depends/hosts/linux.mk2
-rw-r--r--contrib/depends/hosts/mingw32.mk2
-rw-r--r--contrib/depends/toolchain.cmake.in2
7 files changed, 10 insertions, 17 deletions
diff --git a/contrib/depends/Makefile b/contrib/depends/Makefile
index 4b60ee054..07dd5d4af 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 79d449054..3f7e035a4 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 570065560..c63be06c5 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@)