From c0b1add45fbc40dedd5e820bf38ebc5ce1a61e3d Mon Sep 17 00:00:00 2001 From: Andreas Schuh Date: Fri, 28 Sep 2018 15:58:02 +0100 Subject: [PATCH] fix: Import with GFLAGS_USE_TARGET_NAMESPACE=ON --- CMakeLists.txt | 4 ++-- cmake/config.cmake.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2693716..9dec647 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -562,7 +562,7 @@ if (INSTALL_HEADERS) ) install ( EXPORT ${EXPORT_NAME} - FILE ${EXPORT_NAME}-nonamespace.cmake + FILE ${PACKAGE_NAME}-nonamespace-targets.cmake DESTINATION ${CONFIG_INSTALL_DIR} ) if (UNIX) @@ -585,7 +585,7 @@ export ( ) export ( TARGETS ${TARGETS} - FILE "${PROJECT_BINARY_DIR}/${EXPORT_NAME}-nonamespace.cmake" + FILE "${PROJECT_BINARY_DIR}/${PACKAGE_NAME}-nonamespace-targets.cmake" ) if (REGISTER_BUILD_DIR) export (PACKAGE ${PACKAGE_NAME}) diff --git a/cmake/config.cmake.in b/cmake/config.cmake.in index 00bc22f..a512c2a 100644 --- a/cmake/config.cmake.in +++ b/cmake/config.cmake.in @@ -14,7 +14,7 @@ if (@PACKAGE_PREFIX@_USE_TARGET_NAMESPACE) include ("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@.cmake") set (@PACKAGE_PREFIX@_TARGET_NAMESPACE @PACKAGE_NAME@) else () - include ("${CMAKE_CURRENT_LIST_DIR}/@EXPORT_NAME@-nonamespace.cmake") + include ("${CMAKE_CURRENT_LIST_DIR}/@PACKAGE_NAME@-nonamespace-targets.cmake") set (@PACKAGE_PREFIX@_TARGET_NAMESPACE) endif () if (@PACKAGE_PREFIX@_TARGET_NAMESPACE)