diff --git a/cmake/PROJECT_NAMEConfig.cmake.in.in b/cmake/PROJECT_NAMEConfig.cmake.in.in index 21027904ffd0b4e3c28aa32e843db9c696ac13eb..92c8207c189bb9474452261f6a70f39963d264a9 100644 --- a/cmake/PROJECT_NAMEConfig.cmake.in.in +++ b/cmake/PROJECT_NAMEConfig.cmake.in.in @@ -34,6 +34,8 @@ FIND_LIBRARY(@PROJECT_NAME@_LIBRARY @PROJECT_NAME@ NO_DEFAULT_PATH ) +@@PROJECT_NAME@_PUBLIC_DEPENDENCIES_L@ + # Since this file is already part of the installation to be found, the configuration can be hard-coded at # installation time set(@PROJECT_NAME@_VERSION "@@PROJECT_NAME@_SOVERSION@") diff --git a/cmake/create_cmake_config_files.cmake b/cmake/create_cmake_config_files.cmake index fe03409334258ad65fa10cd1e2ad14f19a43ce3f..13fc78de05cd58b66df1654ba51b0f98cdff1479 100644 --- a/cmake/create_cmake_config_files.cmake +++ b/cmake/create_cmake_config_files.cmake @@ -53,6 +53,11 @@ foreach(LIBRARY ${LIST}) endif() endforeach() +set(${PROJECT_NAME}_PUBLIC_DEPENDENCIES_L "") +foreach(DEPENDENCY ${${PROJECT_NAME}_PUBLIC_DEPENDENCIES}) + string(APPEND ${PROJECT_NAME}_PUBLIC_DEPENDENCIES_L "find_package(${DEPENDENCY} REQUIRED)\n") +endforeach() + # we have nested @-statements, so we have to parse twice: # create the cmake find_package configuration file