File tree Expand file tree Collapse file tree 2 files changed +16
-21
lines changed
Expand file tree Collapse file tree 2 files changed +16
-21
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ set(SOURCES
4545
4646add_executable (websocket_proxy ${SOURCES} )
4747target_include_directories (websocket_proxy PUBLIC include ${slick_queue_SOURCE_DIR} /include ${spdlog_SOURCE_DIR} ${RELEASE_DIR} /include )
48- target_link_libraries (websocket_proxy PRIVATE spdlog::spdlog_header_only Boost::asio Boost::beast OpenSSL::SSL OpenSSL::Crypto)
48+ target_link_libraries (websocket_proxy PRIVATE spdlog::spdlog Boost::asio Boost::beast OpenSSL::SSL OpenSSL::Crypto)
4949target_precompile_headers(websocket_proxy PRIVATE src/pch.hpp)
5050
5151if (MSVC )
@@ -59,3 +59,14 @@ if (MSVC)
5959 target_compile_options (websocket_proxy PRIVATE "/bigobj" )
6060 set_target_properties (websocket_proxy PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" )
6161endif ()
62+
63+ if (CMAKE_BUILD_TYPE MATCHES Release)
64+ add_custom_command (TARGET websocket_proxy
65+ POST_BUILD
66+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_BINARY_DIR} /bin/Release ${RELEASE_DIR} /bin
67+ COMMAND ${CMAKE_COMMAND} -E tar "cfv" "websocket_proxy_${BUILD_VERSION} .zip" --format=zip "${RELEASE_DIR} /bin" "${RELEASE_DIR} /include"
68+ WORKING_DIRECTORY "${RELEASE_DIR} "
69+ COMMENT "Creating zip archive"
70+ )
71+ endif ()
72+
Original file line number Diff line number Diff line change 11#pragma once
22
3- // #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
4- // #define WIN32_LEAN_AND_MEAN
5- // #include <Windows.h>
6- // #endif
7-
8- #ifdef _WIN32
9- # ifdef USE_ASIO
10- // Set the proper SDK version before including boost/Asio
11- # include < SDKDDKVer.h>
12- // Note boost/ASIO includes Windows.h.
13- # include < boost/asio.hpp>
14- # else // USE_ASIO
15- # define WIN32_LEAN_AND_MEAN
16- # include < Windows.h>
17- # endif // USE_ASIO
3+ #if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__)
4+ #define WIN32_LEAN_AND_MEAN
5+ #include < Windows.h>
186#include < tlhelp32.h>
19- #else // _WIN32
20- # ifdef USE_ASIO
21- # include < boost/asio.hpp>
22- # endif // USE_ASIO
23- #endif // _WIN32
7+ #endif
248
259#include < cstdint>
2610#include < thread>
You can’t perform that action at this time.
0 commit comments