mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-13 17:37:58 +08:00
Use COMPONENT arguments in install() commands
This commit is contained in:
parent
8c74d8b198
commit
184e6ed916
@ -147,31 +147,47 @@ write_basic_package_version_file(
|
||||
|
||||
configure_file(scripts/pugixml.pc.in pugixml.pc @ONLY)
|
||||
|
||||
if (NOT DEFINED PUGIXML_RUNTIME_COMPONENT)
|
||||
set(PUGIXML_RUNTIME_COMPONENT Runtime)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PUGIXML_LIBRARY_COMPONENT)
|
||||
set(PUGIXML_LIBRARY_COMPONENT Library)
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED PUGIXML_DEVELOPMENT_COMPONENT)
|
||||
set(PUGIXML_DEVELOPMENT_COMPONENT Development)
|
||||
endif()
|
||||
|
||||
set(namelink-component)
|
||||
if (NOT CMAKE_VERSION VERSION_LESS 3.12)
|
||||
set(namelink-component NAMELINK_COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||
endif()
|
||||
install(TARGETS ${install-targets}
|
||||
EXPORT pugixml-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT ${PUGIXML_RUNTIME_COMPONENT}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_LIBRARY_COMPONENT} ${namelink-component}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir})
|
||||
|
||||
install(EXPORT pugixml-targets
|
||||
NAMESPACE pugixml::
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||
|
||||
install(FILES
|
||||
"${PROJECT_BINARY_DIR}/pugixml-config-version.cmake"
|
||||
"${PROJECT_BINARY_DIR}/pugixml-config.cmake"
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml)
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pugixml COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||
|
||||
install(FILES ${PROJECT_BINARY_DIR}/pugixml.pc
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||
|
||||
install(
|
||||
FILES
|
||||
"${PROJECT_SOURCE_DIR}/src/pugiconfig.hpp"
|
||||
"${PROJECT_SOURCE_DIR}/src/pugixml.hpp"
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir})
|
||||
${CMAKE_INSTALL_INCLUDEDIR}${versioned-dir} COMPONENT ${PUGIXML_DEVELOPMENT_COMPONENT})
|
||||
|
||||
if (BUILD_TESTS)
|
||||
set(fuzz-pattern "tests/fuzz_*.cpp")
|
||||
|
Loading…
x
Reference in New Issue
Block a user