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

Add namespace ccd to exported CMake targets #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion ccd-config.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ set(CCD_SOVERSION @CCD_SOVERSION@)
set(CCD_FOUND ON)
set_and_check(CCD_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@")
set_and_check(CCD_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
set(CCD_LIBRARIES ccd)
set(CCD_LIBRARIES ccd::ccd)

include("${CMAKE_CURRENT_LIST_DIR}/ccd-targets.cmake")
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ if(NOT WIN32)
endif()
endif()

export(TARGETS ccd FILE "${CMAKE_BINARY_DIR}/ccd-targets.cmake")
export(TARGETS ccd NAMESPACE ccd:: FILE "${CMAKE_BINARY_DIR}/ccd-targets.cmake")

install(TARGETS ccd
EXPORT ccd-targets
Expand All @@ -67,7 +67,7 @@ install(TARGETS ccd
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ccd"
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(EXPORT ccd-targets DESTINATION "${CMAKE_INSTALL_LIBDIR}/ccd")
install(EXPORT ccd-targets DESTINATION "${CMAKE_INSTALL_LIBDIR}/ccd" NAMESPACE ccd::)

if(NOT WIN32 AND BUILD_TESTING)
add_subdirectory(testsuites)
Expand Down