diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 49d2c165..c30cc5bf 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -831,7 +831,10 @@ install(TARGETS HSPlasma LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(EXPORT HSPlasma-targets DESTINATION share/cmake/HSPlasma) +install(EXPORT HSPlasma-targets + DESTINATION share/cmake/HSPlasma + NAMESPACE HSPlasma:: +) include(CMakePackageConfigHelpers) configure_package_config_file(HSPlasmaConfig.cmake.in diff --git a/core/HSPlasmaConfig.cmake.in b/core/HSPlasmaConfig.cmake.in index f92483a4..7296dafd 100644 --- a/core/HSPlasmaConfig.cmake.in +++ b/core/HSPlasmaConfig.cmake.in @@ -10,3 +10,5 @@ include(${CMAKE_CURRENT_LIST_DIR}/HSPlasma-targets.cmake) check_required_components("HSPlasma") set_and_check(HSPlasma_INCLUDE_DIRS "${PACKAGE_PREFIX_DIR}/include/HSPlasma") + +add_library(HSPlasma ALIAS HSPlasma::HSPlasma) diff --git a/net/CMakeLists.txt b/net/CMakeLists.txt index 66639d50..2c7cfa27 100644 --- a/net/CMakeLists.txt +++ b/net/CMakeLists.txt @@ -117,7 +117,10 @@ install(TARGETS HSPlasmaNet LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) -install(EXPORT HSPlasmaNet-targets DESTINATION share/cmake/HSPlasmaNet) +install(EXPORT HSPlasmaNet-targets + DESTINATION share/cmake/HSPlasmaNet + NAMESPACE HSPlasma:: +) include(CMakePackageConfigHelpers) configure_package_config_file(HSPlasmaNetConfig.cmake.in diff --git a/net/HSPlasmaNetConfig.cmake.in b/net/HSPlasmaNetConfig.cmake.in index fbb2c6d7..3009378a 100644 --- a/net/HSPlasmaNetConfig.cmake.in +++ b/net/HSPlasmaNetConfig.cmake.in @@ -10,4 +10,6 @@ check_required_components("HSPlasmaNet") set_and_check(HSPlasmaNet_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/include/HSPlasmaNet") set(HSPlasmaNet_INCLUDE_DIRS ${HSPlasmaNet_INCLUDE_DIR} ${HSPlasma_INCLUDE_DIRS}) -set(HSPlasmaNet_LIBRARIES HSPlasmaNet HSPlasma) +set(HSPlasmaNet_LIBRARIES HSPlasma::HSPlasmaNet HSPlasma::HSPlasma) + +add_library(HSPlasmaNet ALIAS HSPlasma::HSPlasmaNet)