From 9106bd66de796c4e2ad75db9705b1f9967af2563 Mon Sep 17 00:00:00 2001 From: Pierre Gergondet Date: Tue, 9 Jun 2020 16:36:38 +0800 Subject: [PATCH] Revert "Fix isssue #398 Do not call INSTALL(EXPORT ...) when having no targets but generates the Config.cmake file." This reverts commit 5d602f89671dc4790e405885169c00a855e60f9e. --- package-config.cmake | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/package-config.cmake b/package-config.cmake index 60f513444..b89d7038a 100644 --- a/package-config.cmake +++ b/package-config.cmake @@ -168,12 +168,9 @@ install( # Config # * /lib/cmake/Foo/FooTargets.cmake -if(${TARGETS_EXPORT_NAME}) - install( +install( EXPORT "${TARGETS_EXPORT_NAME}" NAMESPACE "${namespace}" DESTINATION "${CONFIG_INSTALL_DIR}" - ) -endif(${TARGETS_EXPORT_NAME}) - +) ENDMACRO(SETUP_PROJECT_PACKAGE_FINALIZE)