Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

depends: move cmake system config to hosts files #9005

Merged
merged 1 commit into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 1 addition & 16 deletions contrib/depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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_:=@
Expand Down Expand Up @@ -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)|'\
$< > $@
Expand Down
1 change: 1 addition & 0 deletions contrib/depends/hosts/android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ android_debug_CXXFLAGS=$(android_debug_CFLAGS)

android_native_toolchain=android_ndk

android_cmake_system=Android
2 changes: 2 additions & 0 deletions contrib/depends/hosts/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions contrib/depends/hosts/freebsd.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ freebsd_debug_CXXFLAGS=$(freebsd_debug_CFLAGS)

freebsd_native_toolchain=freebsd_base

freebsd_cmake_system=FreeBSD
2 changes: 2 additions & 0 deletions contrib/depends/hosts/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 2 additions & 0 deletions contrib/depends/hosts/mingw32.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion contrib/depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
@@ -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@)

Expand Down