Add pugixml library to cmake
This commit is contained in:
parent
1bb458198c
commit
5874783d37
1 changed files with 9 additions and 6 deletions
|
@ -16,7 +16,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||||
set(FMT_MODULE ON)
|
set(FMT_MODULE ON)
|
||||||
set(CXX_EXTENSIONS NO)
|
set(CXX_EXTENSIONS NO)
|
||||||
set(BOOST_INCLUDE_LIBRARIES "pfr")
|
set(BOOST_INCLUDE_LIBRARIES "pfr;asio")
|
||||||
option(CPM_USE_LOCAL_PACKAGES "Use local packages" ON)
|
option(CPM_USE_LOCAL_PACKAGES "Use local packages" ON)
|
||||||
|
|
||||||
file(GLOB_RECURSE LIB_SOURCES "src/lib/*.cpp")
|
file(GLOB_RECURSE LIB_SOURCES "src/lib/*.cpp")
|
||||||
|
@ -56,6 +56,9 @@ CPMAddPackage(
|
||||||
OPTIONS "BOOST_SKIP_INSTALL_RULES OFF"
|
OPTIONS "BOOST_SKIP_INSTALL_RULES OFF"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
CPMAddPackage("gh:zeux/pugixml@1.14")
|
||||||
|
|
||||||
set(TMP ${CPM_USE_LOCAL_PACKAGES})
|
set(TMP ${CPM_USE_LOCAL_PACKAGES})
|
||||||
set(CPM_USE_LOCAL_PACKAGES OFF)
|
set(CPM_USE_LOCAL_PACKAGES OFF)
|
||||||
|
|
||||||
|
@ -103,12 +106,12 @@ install(TARGETS larra_xmpp
|
||||||
|
|
||||||
|
|
||||||
if(TARGET Boost::pfr)
|
if(TARGET Boost::pfr)
|
||||||
target_link_libraries(larra_xmpp INTERFACE
|
target_link_libraries(larra_xmpp PUBLIC
|
||||||
Boost::pfr utempl::utempl ${GTKMM_LIBRARIES})
|
Boost::asio utempl::utempl pugixml::pugixml)
|
||||||
else()
|
else()
|
||||||
find_package(Boost 1.85.0 REQUIRED)
|
find_package(Boost 1.85.0 REQUIRED)
|
||||||
target_link_libraries(larra_xmpp INTERFACE
|
target_link_libraries(larra_xmpp PUBLIC
|
||||||
utempl::utempl ${Boost_LIBRARIES} ${GTKMM_LIBRARIES})
|
utempl::utempl ${Boost_LIBRARIES} pugixml::pugixml)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -116,7 +119,7 @@ add_executable(larra)
|
||||||
|
|
||||||
target_compile_features(larra INTERFACE cxx_std_23)
|
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
|
target_sources(larra PUBLIC FILE_SET larraSet TYPE CXX_MODULES
|
||||||
FILES ${SOURCES})
|
FILES ${SOURCES})
|
||||||
|
|
Loading…
Reference in a new issue