1
0
Fork 0
mirror of https://github.com/TheLartians/ModernCppStarter.git synced 2025-08-30 21:51:12 +02:00

install targets to version-specific locations

This commit is contained in:
Lars Melchior 2020-04-14 10:34:35 +02:00
parent 3698cc0a3a
commit 9084218192

View file

@ -69,10 +69,10 @@ write_basic_package_version_file(
install( install(
TARGETS ${PROJECT_NAME} TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION lib COMPONENT Runtime LIBRARY DESTINATION lib/${PROJECT_NAME}-${PROJECT_VERSION} COMPONENT Runtime
ARCHIVE DESTINATION lib COMPONENT Development ARCHIVE DESTINATION lib/${PROJECT_NAME}-${PROJECT_VERSION} COMPONENT Development
RUNTIME DESTINATION bin COMPONENT Runtime RUNTIME DESTINATION bin COMPONENT Runtime
PUBLIC_HEADER DESTINATION include COMPONENT Development PUBLIC_HEADER DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION} COMPONENT Development
BUNDLE DESTINATION bin COMPONENT Runtime BUNDLE DESTINATION bin COMPONENT Runtime
) )
@ -81,12 +81,12 @@ include(CMakePackageConfigHelpers)
configure_package_config_file( configure_package_config_file(
"${PROJECT_SOURCE_DIR}/cmake/Config.cmake.in" "${PROJECT_SOURCE_DIR}/cmake/Config.cmake.in"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
INSTALL_DESTINATION lib/cmake/${PROJECT_NAME} INSTALL_DESTINATION lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
) )
install( install(
EXPORT ${PROJECT_NAME}Targets EXPORT ${PROJECT_NAME}Targets
DESTINATION lib/cmake/${PROJECT_NAME} DESTINATION lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
) )
install( install(
@ -94,10 +94,10 @@ install(
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
"${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake" "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake"
DESTINATION DESTINATION
lib/cmake/${PROJECT_NAME} lib/cmake/${PROJECT_NAME}-${PROJECT_VERSION}
) )
install( install(
DIRECTORY ${PROJECT_SOURCE_DIR}/include/ DIRECTORY ${PROJECT_SOURCE_DIR}/include/
DESTINATION include DESTINATION include/${PROJECT_NAME}-${PROJECT_VERSION}
) )