Skip to content

Commit

Permalink
depends: add CMAKE_SYSTEM_VERSION to toolchain file, set minimum Wind…
Browse files Browse the repository at this point in the history
…ows version
  • Loading branch information
tobtoht committed Jan 4, 2025
1 parent e7a3f3b commit f7c84fc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions contrib/depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ $(host_prefix)/share/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_
-e 's|@release_type@|$(cmake_release_type)|' \
-e 's|@build_tests@|$(build_tests)|' \
-e 's|@cmake_system_name@|$($(host_os)_cmake_system)|' \
-e 's|@cmake_system_version@|$($(host_os)_cmake_system_version)|' \
-e 's|@prefix@|$($(host_arch)_$(host_os)_prefix)|'\
-e 's|@arch@|$(host_arch)|'\
$< > $@
Expand Down
3 changes: 3 additions & 0 deletions contrib/depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,9 @@ ifneq ($(host),$(build))
$(1)_cmake += -DCMAKE_SYSTEM_NAME=$($(host_os)_cmake_system)
$(1)_cmake += -DCMAKE_C_COMPILER_TARGET=$(host)
$(1)_cmake += -DCMAKE_CXX_COMPILER_TARGET=$(host)
ifneq ($($(host_os)_cmake_system_version),)
$(1)_cmake += -DCMAKE_SYSTEM_VERSION=$($(host_os)_cmake_system_version)
endif
endif
endif
endef
Expand Down
1 change: 1 addition & 0 deletions contrib/depends/hosts/mingw32.mk
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC

mingw32_cmake_system=Windows
mingw32_cmake_system_version=10.0
1 change: 1 addition & 0 deletions contrib/depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Set the system name to one of Android, Darwin, FreeBSD, Linux, or Windows
SET(CMAKE_SYSTEM_NAME @cmake_system_name@)
SET(CMAKE_SYSTEM_VERSION @host_system_version@)
SET(CMAKE_SYSTEM_PROCESSOR @arch@)
SET(CMAKE_BUILD_TYPE @release_type@)

Expand Down

0 comments on commit f7c84fc

Please sign in to comment.