Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit48bbadb

Browse files
committed
Build: Add cmake option CPP-NETLIB_WINAPI_VERSION
This option allows us to setup _WIN32_WINNT definition valuefrom cmake command lineDefault value is 0x0501 (_WIN32_WINNT_WINXP)https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt
1 parent604d50e commit48bbadb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ option( CPP-NETLIB_ENABLE_HTTPS "Build cpp-netlib with support for https if Open
1515
option(CPP-NETLIB_STATIC_OPENSSL"Build cpp-netlib using static OpenSSL"OFF)
1616
option(CPP-NETLIB_STATIC_BOOST"Build cpp-netlib using static Boost"OFF)
1717

18+
if (NOTDEFINEDCPP-NETLIB_WINAPI_VERSION)
19+
set(CPP-NETLIB_WINAPI_VERSION0x0501)
20+
endif()
21+
1822
include(GNUInstallDirs)
1923

2024
# determine install path for CMake config files
@@ -116,7 +120,7 @@ endif()
116120

117121

118122
if (WIN32)
119-
target_compile_definitions(cppnetlibINTERFACE_WIN32_WINNT=0x0501)
123+
target_compile_definitions(cppnetlibINTERFACE_WIN32_WINNT=${CPP-NETLIB_WINAPI_VERSION}BOOST_USE_WINAPI_VERSION=${CPP-NETLIB_WINAPI_VERSION})
120124

121125
if (MSVC)
122126
target_compile_options(cppnetlibINTERFACE/bigobj)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp