Skip to content

Commit

Permalink
Fixed issues with other ASIO versions
Browse files Browse the repository at this point in the history
Added ASIO_DISABLE_VISIBILITY Flag to fix issues when using multiple asion versions in one project. Now ASIO symbols are not exported any more.
  • Loading branch information
FlorianReimold committed Apr 9, 2021
1 parent 89e7319 commit 5f8f253
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions fineftp-server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
cmake_minimum_required(VERSION 3.5.1)

project(server)
set(PROJECT_VERSION_STRING 1.0.10)
set(PROJECT_VERSION_STRING 1.0.11)
set(PROJECT_VERSION_MAJOR 1)
set(PROJECT_VERSION_MINOR 0)
set(PROJECT_VERSION_PATCH 10)
set(PROJECT_VERSION_PATCH 11)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
@@ -50,10 +50,13 @@ target_link_libraries(${PROJECT_NAME}
# Link asio as described in this workaround: https://gitlab.kitware.com/cmake/cmake/-/issues/15415#note_633938
target_link_libraries (${PROJECT_NAME} PRIVATE $<BUILD_INTERFACE:asio::asio>)

target_compile_definitions(${PROJECT_NAME} PRIVATE ASIO_STANDALONE)
target_compile_definitions(${PROJECT_NAME} PRIVATE __USE_FILE_OFFSET64=1)
target_compile_definitions(${PROJECT_NAME} PRIVATE _WIN32_WINNT=0x0601)

target_compile_definitions(${PROJECT_NAME}
PRIVATE
ASIO_STANDALONE
ASIO_DISABLE_VISIBILITY
__USE_FILE_OFFSET64=1
_WIN32_WINNT=0x0601
)

target_compile_options(${PROJECT_NAME} PRIVATE
$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:GNU>>:

0 comments on commit 5f8f253

Please sign in to comment.