Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add COMPONENT to install targets #80

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -151,21 +151,25 @@ if (SCN_INSTALL)

install(DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}/include/"
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
COMPONENT scnlib_Development)

install(DIRECTORY
"${CMAKE_CURRENT_SOURCE_DIR}/src/"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/scn/detail")
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/scn/detail"
COMPONENT scnlib_Development)

install(FILES
"${CMAKE_CURRENT_SOURCE_DIR}/README.md"
"${CMAKE_CURRENT_SOURCE_DIR}/LICENSE"
DESTINATION ${CMAKE_INSTALL_DATADIR}/scn)
DESTINATION ${CMAKE_INSTALL_DATADIR}/scn
COMPONENT scnlib_Development)

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/scnConfigVersion.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/scnConfig.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/scn")
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/scn"
COMPONENT scnlib_Development)

export(TARGETS ${SCN_EXPORT_TARGETS_LIST}
NAMESPACE scn
Expand All @@ -174,12 +178,14 @@ if (SCN_INSTALL)
export(PACKAGE scn)

install(TARGETS ${SCN_EXPORT_TARGETS_LIST}
COMPONENT scnlib_Development
EXPORT scnTargets
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

install(EXPORT scnTargets
COMPONENT scnlib_Development
NAMESPACE scn::
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/scn")
endif ()