[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix _WIN32_WINNT version and provision
Browse files Browse the repository at this point in the history
Signed-off-by: Sven Eden <sven@eden-worx.com>
  • Loading branch information
Sven Eden committed Apr 14, 2023
1 parent fd2c227 commit acc7e68
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,12 @@ configure_file(src/plugin-macros.h.in plugin-macros.generated.h)
target_sources(obs-websocket PRIVATE plugin-macros.generated.h)

target_compile_definitions(
obs-websocket PRIVATE ASIO_STANDALONE $<$<BOOL:PLUGIN_TESTS>:PLUGIN_TESTS>
$<$<PLATFORM_ID:Windows>:_WEBSOCKETPP_CPP11_STL_> $<$<PLATFORM_ID:Windows>:_WIN32_WINNT=0x0603>)
obs-websocket
PRIVATE
ASIO_STANDALONE
$<$<BOOL:PLUGIN_TESTS>:PLUGIN_TESTS>
$<$<PLATFORM_ID:Windows>:_WEBSOCKETPP_CPP11_STL_>
$<$<PLATFORM_ID:Windows>:_WIN32_WINNT=0x0A00>)

target_compile_options(
obs-websocket
Expand Down
2 changes: 1 addition & 1 deletion cmake/legacy.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ endif()

# Random other things
if(WIN32)
add_definitions(-D_WEBSOCKETPP_CPP11_STL_)
add_definitions(-D_WEBSOCKETPP_CPP11_STL_ -D_WIN32_WINNT=0x0A00)
endif()

if(MSVC)
Expand Down
4 changes: 4 additions & 0 deletions src/plugin-macros.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ with this program. If not, see <https://www.gnu.org/licenses/>
*/

#pragma once
#ifndef SRC_PLUGIN_MACROS_GENERATED_H_INCLUDED
#define SRC_PLUGIN_MACROS_GENERATED_H_INCLUDED 1

#include <util/base.h>
#ifndef _DEBUG
Expand All @@ -32,3 +34,5 @@ with this program. If not, see <https://www.gnu.org/licenses/>
#define OBS_WEBSOCKET_RPC_VERSION @OBS_WEBSOCKET_RPC_VERSION@

#define QT_TO_UTF8(str) str.toUtf8().constData()

#endif // SRC_PLUGIN_MACROS_GENERATED_H_INCLUDED

0 comments on commit acc7e68

Please sign in to comment.