Skip to content

Commit

Permalink
Fix isssue jrl-umi3218#398
Browse files Browse the repository at this point in the history
Do not call INSTALL(EXPORT ...) when having no targets but generates the Config.cmake file.
  • Loading branch information
olivier-stasse authored and jcarpent committed Jun 23, 2020
1 parent 89bd429 commit f58591e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions package-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,12 @@ install(

# Config
# * <prefix>/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)

0 comments on commit f58591e

Please sign in to comment.