73 lines
2.0 KiB
CMake
73 lines
2.0 KiB
CMake
if(PROJECT_IS_TOP_LEVEL)
|
|
set(
|
|
CMAKE_INSTALL_INCLUDEDIR "include/nix-gcc-multi-issue-${PROJECT_VERSION}"
|
|
CACHE STRING ""
|
|
)
|
|
set_property(CACHE CMAKE_INSTALL_INCLUDEDIR PROPERTY TYPE PATH)
|
|
endif()
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
include(GNUInstallDirs)
|
|
|
|
# find_package(<package>) call for consumers to find this project
|
|
set(package nix-gcc-multi-issue)
|
|
|
|
install(
|
|
DIRECTORY
|
|
include/
|
|
"${PROJECT_BINARY_DIR}/export/"
|
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
|
COMPONENT nix-gcc-multi-issue_Development
|
|
)
|
|
|
|
install(
|
|
TARGETS nix-gcc-multi-issue_nix-gcc-multi-issue
|
|
EXPORT nix-gcc-multi-issueTargets
|
|
RUNTIME #
|
|
COMPONENT nix-gcc-multi-issue_Runtime
|
|
LIBRARY #
|
|
COMPONENT nix-gcc-multi-issue_Runtime
|
|
NAMELINK_COMPONENT nix-gcc-multi-issue_Development
|
|
ARCHIVE #
|
|
COMPONENT nix-gcc-multi-issue_Development
|
|
INCLUDES #
|
|
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
|
|
)
|
|
|
|
write_basic_package_version_file(
|
|
"${package}ConfigVersion.cmake"
|
|
COMPATIBILITY SameMajorVersion
|
|
)
|
|
|
|
# Allow package maintainers to freely override the path for the configs
|
|
set(
|
|
nix-gcc-multi-issue_INSTALL_CMAKEDIR "${CMAKE_INSTALL_LIBDIR}/cmake/${package}"
|
|
CACHE STRING "CMake package config location relative to the install prefix"
|
|
)
|
|
set_property(CACHE nix-gcc-multi-issue_INSTALL_CMAKEDIR PROPERTY TYPE PATH)
|
|
mark_as_advanced(nix-gcc-multi-issue_INSTALL_CMAKEDIR)
|
|
|
|
install(
|
|
FILES cmake/install-config.cmake
|
|
DESTINATION "${nix-gcc-multi-issue_INSTALL_CMAKEDIR}"
|
|
RENAME "${package}Config.cmake"
|
|
COMPONENT nix-gcc-multi-issue_Development
|
|
)
|
|
|
|
install(
|
|
FILES "${PROJECT_BINARY_DIR}/${package}ConfigVersion.cmake"
|
|
DESTINATION "${nix-gcc-multi-issue_INSTALL_CMAKEDIR}"
|
|
COMPONENT nix-gcc-multi-issue_Development
|
|
)
|
|
|
|
install(
|
|
EXPORT nix-gcc-multi-issueTargets
|
|
NAMESPACE nix-gcc-multi-issue::
|
|
DESTINATION "${nix-gcc-multi-issue_INSTALL_CMAKEDIR}"
|
|
COMPONENT nix-gcc-multi-issue_Development
|
|
)
|
|
|
|
if(PROJECT_IS_TOP_LEVEL)
|
|
include(CPack)
|
|
endif()
|