diff --git a/package-config.cmake b/package-config.cmake index b89d7038a..60f513444 100644 --- a/package-config.cmake +++ b/package-config.cmake @@ -168,9 +168,12 @@ install( # Config # * /lib/cmake/Foo/FooTargets.cmake -install( +if(${TARGETS_EXPORT_NAME}) + install( EXPORT "${TARGETS_EXPORT_NAME}" NAMESPACE "${namespace}" DESTINATION "${CONFIG_INSTALL_DIR}" -) + ) +endif(${TARGETS_EXPORT_NAME}) + ENDMACRO(SETUP_PROJECT_PACKAGE_FINALIZE)