Skip to content

Commit

Permalink
CXXCBC-597: use static library for ASIO and update it to 1.31.0
Browse files Browse the repository at this point in the history
  • Loading branch information
avsej committed Sep 16, 2024
1 parent 795fb78 commit 4861689
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cmake/ThirdPartyDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,9 @@ if(NOT TARGET asio::asio)
NAME
asio
GIT_TAG
asio-1-30-2
asio-1-31-0
VERSION
1.30.2
1.31.0
GITHUB_REPOSITORY
"chriskohlhoff/asio")
endif()
Expand All @@ -177,11 +177,11 @@ endif()
#
# 2) WIN32_LEAN_AND_MEAN is defined to make Winsock2 work.
if(asio_ADDED)
add_library(asio INTERFACE)
add_library(asio STATIC ${asio_SOURCE_DIR}/asio/src/asio.cpp ${asio_SOURCE_DIR}/asio/src/asio_ssl.cpp)

target_include_directories(asio SYSTEM INTERFACE ${asio_SOURCE_DIR}/asio/include)
target_compile_definitions(asio INTERFACE ASIO_STANDALONE ASIO_NO_DEPRECATED)
target_link_libraries(asio INTERFACE Threads::Threads)
target_include_directories(asio SYSTEM PUBLIC ${asio_SOURCE_DIR}/asio/include)
target_compile_definitions(asio PRIVATE ASIO_STANDALONE=1 ASIO_NO_DEPRECATED=1 ASIO_SEPARATE_COMPILATION=1)
target_link_libraries(asio PRIVATE Threads::Threads OpenSSL::SSL OpenSSL::Crypto)
set_target_properties(
asio
PROPERTIES C_VISIBILITY_PRESET hidden
Expand Down

0 comments on commit 4861689

Please sign in to comment.