From 477bcc73fe9335991a28d402fe777726416255d3 Mon Sep 17 00:00:00 2001 From: Christopher Mauney Date: Tue, 21 Jun 2022 11:47:05 -0600 Subject: [PATCH] cmake config guard for submodule mode --- ports-of-callConfig.cmake.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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@)