File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.23)
22project (liblsl
3- VERSION 1.17.4
3+ VERSION 1.17.5
44 LANGUAGES C CXX
55 DESCRIPTION "Labstreaminglayer C/C++ library"
66 HOMEPAGE_URL "https://github.com/sccn/liblsl"
Original file line number Diff line number Diff line change @@ -39,6 +39,11 @@ target_compile_definitions(lslobj
3939 PRIVATE
4040 LIBLSL_EXPORTS
4141 LOGURU_DEBUG_LOGGING=$<BOOL :${LSL_DEBUGLOG} >
42+ # Prevent asio from overriding CMAKE_CXX_VISIBILITY_PRESET with its own
43+ # #pragma GCC visibility push(default). This ensures asio symbols stay
44+ # hidden in the final shared library, avoiding ODR violations when
45+ # applications also use standalone asio.
46+ ASIO_DISABLE_VISIBILITY
4247 PUBLIC
4348 ASIO_NO_DEPRECATED
4449 $<$<CXX_COMPILER_ID:MSVC >:LSLNOAUTOLINK> # don't use #pragma(lib) in CMake builds
@@ -71,11 +76,7 @@ if(NOT LSL_OPTIMIZATIONS)
7176 # build one object file for Asio instead of once every time an Asio function is called. See
7277 # https://think-async.com/Asio/asio-1.18.2/doc/asio/using.html#asio.using.optional_separate_compilation
7378 target_sources (lslobj PRIVATE thirdparty/asio_objects.cpp)
74- target_compile_definitions (lslobj
75- PUBLIC
76- ASIO_SEPARATE_COMPILATION
77- ASIO_DISABLE_VISIBILITY
78- )
79+ target_compile_definitions (lslobj PUBLIC ASIO_SEPARATE_COMPILATION)
7980endif ()
8081
8182# - pugixml
You can’t perform that action at this time.
0 commit comments