Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -910,8 +910,9 @@ endif()

# Link SOD library if enabled
if(ENABLE_SOD)
# Always link to the sod target, whether it's built as static or shared
target_link_libraries(lightnvr sod)
# SOD symbols are used by objects in this static library. Publish the
# dependency so the main executable, tests and utilities all inherit it.
target_link_libraries(lightnvr_lib PUBLIC sod)

# Log the linking method for clarity
if(SOD_DYNAMIC_LINK)
Expand Down
6 changes: 0 additions & 6 deletions tests/unit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ macro(add_layer2_test TEST_NAME)
if(ENABLE_MQTT AND MOSQUITTO_FOUND)
target_link_libraries(${TEST_NAME} ${MOSQUITTO_LIBRARIES})
endif()
if(ENABLE_SOD)
target_link_libraries(${TEST_NAME} sod)
endif()
set_target_properties(${TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
if("${TEST_NAME}" STREQUAL "test_storage_archive")
find_package(Python3 COMPONENTS Interpreter REQUIRED)
Expand Down Expand Up @@ -112,9 +109,6 @@ macro(add_layer3_test TEST_NAME)
if(ENABLE_MQTT AND MOSQUITTO_FOUND)
target_link_libraries(${TEST_NAME} ${MOSQUITTO_LIBRARIES})
endif()
if(ENABLE_SOD)
target_link_libraries(${TEST_NAME} sod)
endif()
set_target_properties(${TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
add_test(NAME ${TEST_NAME} COMMAND ${TEST_NAME})
lightnvr_ci_test(${TEST_NAME} ${ARGN})
Expand Down
Loading