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 committed Jun 9, 2020
1 parent 9e21ae2 commit e526d24
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 e526d24

Please sign in to comment.