libAttachmentSupport: convert into shared lib

This ensures that the support routines in this library will be
exposed at the same vaddr to each object in the vaddrspace.
This commit is contained in:
2025-11-04 00:22:25 -04:00
parent 7a55a65589
commit 9a4f80a9d6
6 changed files with 22 additions and 9 deletions
+1
View File
@@ -129,6 +129,7 @@ target_link_libraries(salmanoff
Boost::system Boost::log Boost::system Boost::log
smocore smocore
${DL_LIBRARY} ${DL_LIBRARY}
attachmentSupport
) )
# Verify Boost dynamic dependencies after build # Verify Boost dynamic dependencies after build
+12 -6
View File
@@ -1,9 +1,5 @@
add_library(attachmentSupport STATIC add_library(attachmentSupport SHARED
attachmentSupport.cpp stimulusBuffer.cpp
)
set_target_properties(attachmentSupport PROPERTIES
POSITION_INDEPENDENT_CODE ON
) )
target_include_directories(attachmentSupport PUBLIC target_include_directories(attachmentSupport PUBLIC
@@ -16,3 +12,13 @@ target_link_libraries(attachmentSupport PUBLIC
Boost::system Boost::system
Boost::log Boost::log
) )
# Verify Boost dynamic dependencies after build
add_custom_command(TARGET attachmentSupport POST_BUILD
COMMAND ${CMAKE_COMMAND} -DVERIFY_FILE="$<TARGET_FILE:attachmentSupport>"
-P ${CMAKE_SOURCE_DIR}/cmake/VerifyBoostDynamic.cmake
COMMENT "Verifying Boost dynamic dependencies for attachmentSupport"
)
# Install rules
install(TARGETS attachmentSupport DESTINATION lib)
@@ -100,3 +100,4 @@ void StimulusBuffer::onTimeout(const boost::system::error_code& error)
} // namespace stim_buff } // namespace stim_buff
} // namespace smo } // namespace smo
+3 -1
View File
@@ -13,7 +13,9 @@ if(ENABLE_LIB_livoxProto1)
# Set config define for header generation # Set config define for header generation
add_compile_definitions(CONFIG_LIB_LIVOXPROTO1_ENABLED) add_compile_definitions(CONFIG_LIB_LIVOXPROTO1_ENABLED)
target_include_directories(livoxProto1 PUBLIC ${Boost_INCLUDE_DIRS}) 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 # Verify Boost dynamic dependencies after build
add_custom_command(TARGET livoxProto1 POST_BUILD add_custom_command(TARGET livoxProto1 POST_BUILD
+1 -1
View File
@@ -13,7 +13,7 @@ if(ENABLE_LIB_xcbXorg)
# Set config define for header generation # Set config define for header generation
add_compile_definitions(CONFIG_LIB_XCBXORG_ENABLED) add_compile_definitions(CONFIG_LIB_XCBXORG_ENABLED)
target_include_directories(xcbXorg PUBLIC ${XCB_INCLUDE_DIRS}) target_include_directories(xcbXorg PUBLIC ${XCB_INCLUDE_DIRS})
target_link_libraries(xcbXorg ${XCB_LIBRARIES}) target_link_libraries(xcbXorg ${XCB_LIBRARIES} attachmentSupport)
# Install rules # Install rules
install(TARGETS xcbXorg DESTINATION lib) install(TARGETS xcbXorg DESTINATION lib)
+4 -1
View File
@@ -20,7 +20,10 @@ if(ENABLE_STIMBUFFAPI_xcbWindow)
# Link against XCB library directly (libxcbXorg will be loaded dynamically) # Link against XCB library directly (libxcbXorg will be loaded dynamically)
pkg_check_modules(XCB REQUIRED xcb) 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 rules
install(TARGETS xcbWindow DESTINATION lib) install(TARGETS xcbWindow DESTINATION lib)