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)