diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index dfb481bb..fc2a079e 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -837,7 +837,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 e795b918..437f8bac 100644 --- a/core/HSPlasmaConfig.cmake.in +++ b/core/HSPlasmaConfig.cmake.in @@ -13,3 +13,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 a905470e..45bf500d 100644 --- a/net/CMakeLists.txt +++ b/net/CMakeLists.txt @@ -119,7 +119,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 4ba511e1..58275dbe 100644 --- a/net/HSPlasmaNetConfig.cmake.in +++ b/net/HSPlasmaNetConfig.cmake.in @@ -12,4 +12,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)