diff --git a/ccd-config.cmake.in b/ccd-config.cmake.in index 8f13af9..693aff5 100644 --- a/ccd-config.cmake.in +++ b/ccd-config.cmake.in @@ -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") diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 62bf475..4c56eb7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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 @@ -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)