diff --git a/CMakeLists.txt b/CMakeLists.txt index 5821f57..6fc25fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,6 +129,7 @@ target_link_libraries(salmanoff Boost::system Boost::log smocore ${DL_LIBRARY} + attachmentSupport ) # Verify Boost dynamic dependencies after build diff --git a/commonLibs/attachmentSupport/CMakeLists.txt b/commonLibs/attachmentSupport/CMakeLists.txt index 9995bd5..5b8ba93 100644 --- a/commonLibs/attachmentSupport/CMakeLists.txt +++ b/commonLibs/attachmentSupport/CMakeLists.txt @@ -1,9 +1,5 @@ -add_library(attachmentSupport STATIC - attachmentSupport.cpp -) - -set_target_properties(attachmentSupport PROPERTIES - POSITION_INDEPENDENT_CODE ON +add_library(attachmentSupport SHARED + stimulusBuffer.cpp ) target_include_directories(attachmentSupport PUBLIC @@ -16,3 +12,13 @@ target_link_libraries(attachmentSupport PUBLIC Boost::system Boost::log ) + +# Verify Boost dynamic dependencies after build +add_custom_command(TARGET attachmentSupport POST_BUILD + COMMAND ${CMAKE_COMMAND} -DVERIFY_FILE="$" + -P ${CMAKE_SOURCE_DIR}/cmake/VerifyBoostDynamic.cmake + COMMENT "Verifying Boost dynamic dependencies for attachmentSupport" +) + +# Install rules +install(TARGETS attachmentSupport DESTINATION lib) diff --git a/commonLibs/attachmentSupport/attachmentSupport.cpp b/commonLibs/attachmentSupport/stimulusBuffer.cpp similarity index 99% rename from commonLibs/attachmentSupport/attachmentSupport.cpp rename to commonLibs/attachmentSupport/stimulusBuffer.cpp index f2cc361..0828f1d 100644 --- a/commonLibs/attachmentSupport/attachmentSupport.cpp +++ b/commonLibs/attachmentSupport/stimulusBuffer.cpp @@ -100,3 +100,4 @@ void StimulusBuffer::onTimeout(const boost::system::error_code& error) } // namespace stim_buff } // namespace smo + diff --git a/commonLibs/livoxProto1/CMakeLists.txt b/commonLibs/livoxProto1/CMakeLists.txt index 7b29d5f..f915240 100644 --- a/commonLibs/livoxProto1/CMakeLists.txt +++ b/commonLibs/livoxProto1/CMakeLists.txt @@ -13,7 +13,9 @@ if(ENABLE_LIB_livoxProto1) # Set config define for header generation add_compile_definitions(CONFIG_LIB_LIVOXPROTO1_ENABLED) target_include_directories(livoxProto1 PUBLIC ${Boost_INCLUDE_DIRS}) - target_link_libraries(livoxProto1 PUBLIC Boost::system Boost::log) + target_link_libraries(livoxProto1 PUBLIC + Boost::system Boost::log + attachmentSupport) # Verify Boost dynamic dependencies after build add_custom_command(TARGET livoxProto1 POST_BUILD diff --git a/commonLibs/xcbXorg/CMakeLists.txt b/commonLibs/xcbXorg/CMakeLists.txt index c751d59..7dfff32 100644 --- a/commonLibs/xcbXorg/CMakeLists.txt +++ b/commonLibs/xcbXorg/CMakeLists.txt @@ -13,7 +13,7 @@ if(ENABLE_LIB_xcbXorg) # Set config define for header generation add_compile_definitions(CONFIG_LIB_XCBXORG_ENABLED) target_include_directories(xcbXorg PUBLIC ${XCB_INCLUDE_DIRS}) - target_link_libraries(xcbXorg ${XCB_LIBRARIES}) + target_link_libraries(xcbXorg ${XCB_LIBRARIES} attachmentSupport) # Install rules install(TARGETS xcbXorg DESTINATION lib) diff --git a/stimBuffApis/xcbWindow/CMakeLists.txt b/stimBuffApis/xcbWindow/CMakeLists.txt index 3b27425..1e0094b 100644 --- a/stimBuffApis/xcbWindow/CMakeLists.txt +++ b/stimBuffApis/xcbWindow/CMakeLists.txt @@ -20,7 +20,10 @@ if(ENABLE_STIMBUFFAPI_xcbWindow) # Link against XCB library directly (libxcbXorg will be loaded dynamically) pkg_check_modules(XCB REQUIRED xcb) - target_link_libraries(xcbWindow ${XCB_LIBRARIES}) + target_link_libraries(xcbWindow + Boost::system Boost::log + ${XCB_LIBRARIES} + attachmentSupport) # Install rules install(TARGETS xcbWindow DESTINATION lib)