From 5874783d374812b5c6bb987ee2bec3965d51dbbb Mon Sep 17 00:00:00 2001 From: sha512sum Date: Tue, 27 Aug 2024 07:41:40 +0000 Subject: [PATCH] Add pugixml library to cmake --- CMakeLists.txt | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7fe178b..798affc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -16,7 +16,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(FMT_MODULE ON) set(CXX_EXTENSIONS NO) -set(BOOST_INCLUDE_LIBRARIES "pfr") +set(BOOST_INCLUDE_LIBRARIES "pfr;asio") option(CPM_USE_LOCAL_PACKAGES "Use local packages" ON) file(GLOB_RECURSE LIB_SOURCES "src/lib/*.cpp") @@ -56,6 +56,9 @@ CPMAddPackage( OPTIONS "BOOST_SKIP_INSTALL_RULES OFF" ) + +CPMAddPackage("gh:zeux/pugixml@1.14") + set(TMP ${CPM_USE_LOCAL_PACKAGES}) set(CPM_USE_LOCAL_PACKAGES OFF) @@ -103,12 +106,12 @@ install(TARGETS larra_xmpp if(TARGET Boost::pfr) - target_link_libraries(larra_xmpp INTERFACE - Boost::pfr utempl::utempl ${GTKMM_LIBRARIES}) + target_link_libraries(larra_xmpp PUBLIC + Boost::asio utempl::utempl pugixml::pugixml) else() find_package(Boost 1.85.0 REQUIRED) - target_link_libraries(larra_xmpp INTERFACE - utempl::utempl ${Boost_LIBRARIES} ${GTKMM_LIBRARIES}) + target_link_libraries(larra_xmpp PUBLIC + utempl::utempl ${Boost_LIBRARIES} pugixml::pugixml) endif() @@ -116,7 +119,7 @@ add_executable(larra) target_compile_features(larra INTERFACE cxx_std_23) -target_link_libraries(larra larra_xmpp) +target_link_libraries(larra larra_xmpp ${GTKMM_LIBRARIES} ${GTKMM_LIBRARIES}) target_sources(larra PUBLIC FILE_SET larraSet TYPE CXX_MODULES FILES ${SOURCES})