From 53eddf89d9b41b199191b2b8cce250a8e8313be8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:11:52 +0100 Subject: [PATCH 1/7] Pin openDAQ ref --- opendaq_ref | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opendaq_ref b/opendaq_ref index 88d050b..d0a6910 100644 --- a/opendaq_ref +++ b/opendaq_ref @@ -1 +1 @@ -main \ No newline at end of file +4757349a1db30721bead0cb695ec3a147913aef4 From 91d767588149fba7a95accc2103a7c10a50b26bd Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:11:52 +0100 Subject: [PATCH 2/7] Wrap external dependencies with ANCIENT mode --- external/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 4f2433b..9e3f6bb 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,3 +1,5 @@ +opendaq_get_cmake_mode(_LT_STREAMING_CMAKE_MODERN_MODE_SAVED) +opendaq_set_cmake_mode(ANCIENT) set(CMAKE_FOLDER external) list(APPEND CMAKE_MESSAGE_CONTEXT external) @@ -13,3 +15,4 @@ add_subdirectory(spdlog EXCLUDE_FROM_ALL) add_subdirectory(nlohmann_json EXCLUDE_FROM_ALL) add_subdirectory(streaming_protocol EXCLUDE_FROM_ALL) +opendaq_set_cmake_mode(${_LT_STREAMING_CMAKE_MODERN_MODE_SAVED}) From ae6645dd992372d98aad282ee9ed97e1b57e85b2 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:11:53 +0100 Subject: [PATCH 3/7] Use pre-installed dependencies when openDAQ is found via find_package --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e15280a..35e7c5e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,7 @@ if (NOT TARGET "${OPENDAQ_SDK_TARGET_NAMESPACE}::${OPENDAQ_SDK_TARGET_NAME}") FetchContent_MakeAvailable(${OPENDAQ_SDK_NAME}) else() message(STATUS "Found installed ${OPENDAQ_SDK_NAME} version: ${${OPENDAQ_SDK_NAME}_VERSION}") + set(OPENDAQ_ALWAYS_FETCH_DEPENDENCIES OFF CACHE BOOL "" FORCE) endif() endif() add_subdirectory(external/boost) From 74dd16d8d33e12821236c9e3c2543ca828038a5f Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:11:53 +0100 Subject: [PATCH 4/7] Fix DLL path for Windows install-build-and-test job --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fb1ec3..5a458a1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,7 +86,7 @@ jobs: - name: Add DLL path (Windows only) if: matrix.os == 'windows-latest' - run: echo "${{ env.INSTALL_PREFIX }}/lib" >> $env:GITHUB_PATH + run: echo "${{ env.INSTALL_PREFIX }}/bin" >> $env:GITHUB_PATH - name: Configure project with CMake working-directory: module From 79cdb9797abe225963826bae3308f5c9a7f52873 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:11:54 +0100 Subject: [PATCH 5/7] Fix MSVC LNK2005 duplicate fmt symbols with installed openDAQ --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 35e7c5e..a8adad7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -77,6 +77,14 @@ if (NOT TARGET "${OPENDAQ_SDK_TARGET_NAMESPACE}::${OPENDAQ_SDK_TARGET_NAME}") else() message(STATUS "Found installed ${OPENDAQ_SDK_NAME} version: ${${OPENDAQ_SDK_NAME}_VERSION}") set(OPENDAQ_ALWAYS_FETCH_DEPENDENCIES OFF CACHE BOOL "" FORCE) + + # Workaround: installed openDAQ coretypes uses INSTALL_INTERFACE:fmt::fmt-header-only + # which propagates FMT_HEADER_ONLY=1, conflicting with compiled fmt::fmt + # used by spdlog (LNK2005 on MSVC). Redirect fmt-header-only to compiled fmt. + if (TARGET fmt::fmt-header-only AND TARGET fmt::fmt) + set_property(TARGET fmt::fmt-header-only PROPERTY INTERFACE_COMPILE_DEFINITIONS "") + target_link_libraries(fmt::fmt-header-only INTERFACE fmt::fmt) + endif() endif() endif() add_subdirectory(external/boost) From 44f6965fd6faf158d170d1cca8639309fea6b0a3 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Tue, 24 Mar 2026 14:11:54 +0100 Subject: [PATCH 6/7] Rename CMake var for stored target-based mode --- external/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/CMakeLists.txt b/external/CMakeLists.txt index 9e3f6bb..a8d6ad2 100644 --- a/external/CMakeLists.txt +++ b/external/CMakeLists.txt @@ -1,4 +1,4 @@ -opendaq_get_cmake_mode(_LT_STREAMING_CMAKE_MODERN_MODE_SAVED) +opendaq_get_cmake_mode(_LT_STREAMING_CMAKE_LEGACY_MODE_SAVED) opendaq_set_cmake_mode(ANCIENT) set(CMAKE_FOLDER external) list(APPEND CMAKE_MESSAGE_CONTEXT external) @@ -15,4 +15,4 @@ add_subdirectory(spdlog EXCLUDE_FROM_ALL) add_subdirectory(nlohmann_json EXCLUDE_FROM_ALL) add_subdirectory(streaming_protocol EXCLUDE_FROM_ALL) -opendaq_set_cmake_mode(${_LT_STREAMING_CMAKE_MODERN_MODE_SAVED}) +opendaq_set_cmake_mode(${_LT_STREAMING_CMAKE_LEGACY_MODE_SAVED}) From 5a9473c55d7612b7c30dd1c4d29faab80a4d6d58 Mon Sep 17 00:00:00 2001 From: Aliaksandr Adziareika <8034372+alexadereyko@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:13:51 +0100 Subject: [PATCH 7/7] Disable fetch of FMT only instead of openDAQ deps Co-authored-by: NikolaiShipilov <127689162+NikolaiShipilov@users.noreply.github.com> --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a8adad7..2f7aa9a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,7 +76,7 @@ if (NOT TARGET "${OPENDAQ_SDK_TARGET_NAMESPACE}::${OPENDAQ_SDK_TARGET_NAME}") FetchContent_MakeAvailable(${OPENDAQ_SDK_NAME}) else() message(STATUS "Found installed ${OPENDAQ_SDK_NAME} version: ${${OPENDAQ_SDK_NAME}_VERSION}") - set(OPENDAQ_ALWAYS_FETCH_DEPENDENCIES OFF CACHE BOOL "" FORCE) + set(OPENDAQ_ALWAYS_FETCH_FMT OFF CACHE BOOL "" FORCE) # Workaround: installed openDAQ coretypes uses INSTALL_INTERFACE:fmt::fmt-header-only # which propagates FMT_HEADER_ONLY=1, conflicting with compiled fmt::fmt