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

Use namespaces for exported targets. #278

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions core/HSPlasmaConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
5 changes: 4 additions & 1 deletion net/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion net/HSPlasmaNetConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Loading