From 218ee5f31f221b337999b60d07ffcfa4cdca0659 Mon Sep 17 00:00:00 2001 From: Thorsten Hater <24411438+thorstenhater@users.noreply.github.com> Date: Fri, 12 Apr 2024 11:01:29 +0200 Subject: [PATCH] Fix pugixml+export. --- CMakeLists.txt | 2 ++ arborio/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 77232682b4..73441f266b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ include(CheckIPOSupported) # Make CUDA support throw errors if architectures remain unclear cmake_policy(SET CMP0104 NEW) +cmake_policy(SET CMP0148 NEW) set(CPM_USE_LOCAL_PACKAGES ON) include(cmake/CPM.cmake) @@ -313,6 +314,7 @@ else() find_package(pugixml REQUIRED) target_link_libraries(ext-pugixml INTERFACE pugixml::pugixml) endif() +install(TARGETS ext-pugixml EXPORT arbor-targets) CPMAddPackage(NAME fmt GITHUB_REPOSITORY fmtlib/fmt diff --git a/arborio/CMakeLists.txt b/arborio/CMakeLists.txt index a6d3511f23..3d6f75c935 100644 --- a/arborio/CMakeLists.txt +++ b/arborio/CMakeLists.txt @@ -10,7 +10,7 @@ set(arborio-sources add_library(arborio ${arborio-sources}) -target_link_libraries(arborio PUBLIC pugixml::pugixml) +target_link_libraries(arborio PUBLIC ext-pugixml) add_library(arborio-public-headers INTERFACE) add_library(arborio-private-headers INTERFACE)