mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
base: Set the correct Windows preprocessor var for asio
Fix C4996 warning Co-authored-by: PatTheMav <PatTheMav@users.noreply.github.com>
This commit is contained in:
parent
190a9551f6
commit
420e600864
@ -144,6 +144,20 @@ endif()
|
||||
# Random other things
|
||||
if(WIN32)
|
||||
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
|
||||
|
||||
# Set the correct Windows preprocessor var for asio
|
||||
macro(get_WIN32_WINNT version)
|
||||
if (WIN32 AND CMAKE_SYSTEM_VERSION)
|
||||
set(ver ${CMAKE_SYSTEM_VERSION})
|
||||
string(REPLACE "." "" ver ${ver})
|
||||
string(REGEX REPLACE "([0-9])" "0\\1" ver ${ver})
|
||||
|
||||
set(${version} "0x${ver}")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
get_WIN32_WINNT(ver)
|
||||
add_definitions(-D_WIN32_WINNT=${ver})
|
||||
elseif(UNIX AND NOT APPLE)
|
||||
target_compile_options(
|
||||
obs-websocket PRIVATE -Wall -Wextra -Wno-missing-field-initializers
|
||||
|
Loading…
Reference in New Issue
Block a user