diff --git a/ports-of-callConfig.cmake.in b/ports-of-callConfig.cmake.in index fada53fe..1265d426 100644 --- a/ports-of-callConfig.cmake.in +++ b/ports-of-callConfig.cmake.in @@ -5,6 +5,8 @@ @PACKAGE_INIT@ -include("${CMAKE_CURRENT_LIST_DIR}/@POCLIB@Targets.cmake") +if(NOT TARGET @POCLIB@ AND NOT @POCLIB@_BINARY_DIR) + include("${CMAKE_CURRENT_LIST_DIR}/@POCLIB@Targets.cmake") +endif() check_required_components(@POCLIB@)