mirror of
https://github.com/oxen-io/lokinet
synced 2023-12-14 06:53:00 +01:00
Set _WIN32_WINNT in static deps
Set -D_WIN32_WINNT for static deps; unbound, in particular, needs this as the latest version appears to rely on something only provided in non-ancient windows to build properly. This required moving _winver into the toolchain file so that it is available earlier in cmake code (StaticBuild is included long before win32.cmake), but also this seems a more appropriate place for it.
This commit is contained in:
parent
081dfd3328
commit
f2454285fe
3 changed files with 10 additions and 4 deletions
|
@ -167,6 +167,11 @@ if(APPLE)
|
||||||
set(deps_CXXFLAGS "${deps_CXXFLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
set(deps_CXXFLAGS "${deps_CXXFLAGS} -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(_winver)
|
||||||
|
set(deps_CFLAGS "${deps_CFLAGS} -D_WIN32_WINNT=${_winver}")
|
||||||
|
set(deps_CXXFLAGS "${deps_CXXFLAGS} -D_WIN32_WINNT=${_winver}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
if("${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles")
|
if("${CMAKE_GENERATOR}" STREQUAL "Unix Makefiles")
|
||||||
set(_make $(MAKE))
|
set(_make $(MAKE))
|
||||||
|
|
|
@ -13,9 +13,6 @@ option(WITH_WINDOWS_32 "build 32 bit windows" OFF)
|
||||||
# GNU ld sees fit to merge *all* the .ident sections in object files
|
# GNU ld sees fit to merge *all* the .ident sections in object files
|
||||||
# to .r[o]data section one after the other!
|
# to .r[o]data section one after the other!
|
||||||
add_compile_options(-fno-ident -Wa,-mbig-obj)
|
add_compile_options(-fno-ident -Wa,-mbig-obj)
|
||||||
# the minimum windows version, set to 6 rn because supporting older windows is hell
|
|
||||||
set(_winver 0x0600)
|
|
||||||
add_definitions(-D_WIN32_WINNT=${_winver})
|
|
||||||
|
|
||||||
if(EMBEDDED_CFG)
|
if(EMBEDDED_CFG)
|
||||||
link_libatomic()
|
link_libatomic()
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
set(CMAKE_SYSTEM_VERSION 5.0)
|
set(CMAKE_SYSTEM_VERSION 6.0)
|
||||||
|
|
||||||
|
# the minimum windows version, set to 6 rn because supporting older windows is hell
|
||||||
|
set(_winver 0x0600)
|
||||||
|
add_definitions(-D_WIN32_WINNT=${_winver})
|
||||||
|
|
||||||
# target environment on the build host system
|
# target environment on the build host system
|
||||||
# second one is for non-root installs
|
# second one is for non-root installs
|
||||||
|
|
Loading…
Reference in a new issue