Skip to content

Commit

Permalink
depends: Add CMAKE_SYSTEM_VERSION to CMake toolchain file
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed May 15, 2024
1 parent f86fcb9 commit 753cd1c
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ $(host_prefix)/toolchain.cmake : toolchain.cmake.in $(host_prefix)/.stamp_$(fina
@mkdir -p $(@D)
sed -e 's|@depends_crosscompiling@|$(crosscompiling)|' \
-e 's|@host_system_name@|$($(host_os)_cmake_system_name)|' \
-e 's|@host_system_version@|$($(host_os)_cmake_system_version)|' \
-e 's|@host_arch@|$(host_arch)|' \
-e 's|@CC@|$(host_CC)|' \
-e 's|@CXX@|$(host_CXX)|' \
Expand Down
3 changes: 3 additions & 0 deletions depends/hosts/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,6 @@ darwin_debug_CFLAGS=-O1 -g
darwin_debug_CXXFLAGS=$(darwin_debug_CFLAGS)

darwin_cmake_system_name=Darwin
# Darwin version, which corresponds to OSX_MIN_VERSION.
# See https://en.wikipedia.org/wiki/Darwin_(operating_system)
darwin_cmake_system_version=20.1
3 changes: 3 additions & 0 deletions depends/hosts/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,7 @@ 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_name=Linux
# Refer to doc/dependencies.md for the minimum required kernel.
linux_cmake_system_version=3.17.0
2 changes: 2 additions & 0 deletions depends/hosts/mingw32.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ mingw32_debug_CXXFLAGS=$(mingw32_debug_CFLAGS)
mingw32_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC

mingw32_cmake_system_name=Windows
# Windows 7 (NT 6.1).
mingw32_cmake_system_version=6.1
1 change: 1 addition & 0 deletions depends/toolchain.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

if(@depends_crosscompiling@)
set(CMAKE_SYSTEM_NAME @host_system_name@)
set(CMAKE_SYSTEM_VERSION @host_system_version@)
set(CMAKE_SYSTEM_PROCESSOR @host_arch@)
endif()

Expand Down

0 comments on commit 753cd1c

Please sign in to comment.