From f2090e5f7e356c38973aaa66f760fc2b045bbf93 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 14 Jul 2026 12:29:11 +0200 Subject: [PATCH 1/2] Fix pugixml dependency --- CHANGELOG.md | 4 ++++ CMakeLists.txt | 7 ++++++- libxdfConfig.cmake.in | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a07db5..bbc94a3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [1.0.3] · YYYY-MM-DD +### 🔧 Fixed +- `libxdfConfig.cmake` no longer unconditionally requires system `pugixml` for library consumers ([Clemens Brunner](https://github.com/cbrnr)) + ## [1.0.2] · 2026-07-07 ### ✨ Added - Add `libxdfConfigVersion.cmake` to allow CMake's `find_package()` to check for compatible versions ([#62](https://github.com/xdf-modules/libxdf/pull/62) by [Clemens Brunner](https://github.com/cbrnr)) diff --git a/CMakeLists.txt b/CMakeLists.txt index 13517b2..9bf30f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ set(CMAKE_OSX_DEPLOYMENT_TARGET 11) project( libxdf - VERSION 1.0.2 + VERSION 1.0.3 DESCRIPTION "C++ library for loading multimodal, multi-rate signals stored in XDF files" HOMEPAGE_URL https://xdf-modules.github.io/libxdf/ ) @@ -34,10 +34,15 @@ find_package(pugixml 1.9 QUIET) if(TARGET pugixml AND NOT XDF_NO_SYSTEM_PUGIXML) message(STATUS "Using system pugixml") target_link_libraries(xdf PRIVATE pugixml) + # Consumers of the installed xdf target need to find_dependency(pugixml) + # too (see libxdfConfig.cmake.in), but only in this branch: the bundled + # copy below is compiled directly into libxdf and needs nothing external. + set(XDF_PUGIXML_FIND_DEPENDENCY "find_dependency(pugixml)") else() message(STATUS "Using bundled pugixml") target_sources(xdf PRIVATE pugixml/pugixml.cpp) target_include_directories(xdf PRIVATE pugixml) + set(XDF_PUGIXML_FIND_DEPENDENCY "") endif() target_compile_features(xdf PUBLIC cxx_std_20) diff --git a/libxdfConfig.cmake.in b/libxdfConfig.cmake.in index 84331f0..b3df056 100644 --- a/libxdfConfig.cmake.in +++ b/libxdfConfig.cmake.in @@ -2,7 +2,7 @@ include(CMakeFindDependencyMacro) -find_dependency(pugixml) +@XDF_PUGIXML_FIND_DEPENDENCY@ if(NOT TARGET XDF::xdf) include("${CMAKE_CURRENT_LIST_DIR}/libxdfTargets.cmake") From c049e9649b01996873d9494967c23d638c2d60c0 Mon Sep 17 00:00:00 2001 From: Clemens Brunner Date: Tue, 14 Jul 2026 12:30:00 +0200 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bbc94a3..4685f07 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ ## [1.0.3] · YYYY-MM-DD ### 🔧 Fixed -- `libxdfConfig.cmake` no longer unconditionally requires system `pugixml` for library consumers ([Clemens Brunner](https://github.com/cbrnr)) +- `libxdfConfig.cmake` no longer unconditionally requires system `pugixml` for library consumers ([#64](https://github.com/xdf-modules/libxdf/pull/64) by [Clemens Brunner](https://github.com/cbrnr)) ## [1.0.2] · 2026-07-07 ### ✨ Added