diff options
author | Brad King <brad.king@kitware.com> | 2021-06-08 12:00:12 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-06-08 12:00:24 (GMT) |
commit | 34eefc6ea328092e565f13736e853004aaece640 (patch) | |
tree | f239d7a9b6f4e96b59d0d1086297504ff50af31a /Modules | |
parent | 4c940e50bf0233accd68aa2f202d36dd956da18e (diff) | |
parent | 6f14205e0885853184d482f901d62fa5c10ac4f9 (diff) | |
download | CMake-34eefc6ea328092e565f13736e853004aaece640.zip CMake-34eefc6ea328092e565f13736e853004aaece640.tar.gz CMake-34eefc6ea328092e565f13736e853004aaece640.tar.bz2 |
Merge topic 'FindPkgConfigAlwaysAddTarget'
6f14205e08 FindPkgConfig: Always create the imported target
07d6390728 Tests: Add case covering FindPkgConfig creation of empty targets
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !6113
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindPkgConfig.cmake | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake index 38c8da7..3bc9dba 100644 --- a/Modules/FindPkgConfig.cmake +++ b/Modules/FindPkgConfig.cmake @@ -265,9 +265,7 @@ endfunction() # create an imported target from all the information returned by pkg-config function(_pkg_create_imp_target _prefix _imp_target_global) - # only create the target if it is linkable, i.e. no executables - if (NOT TARGET PkgConfig::${_prefix} - AND ( ${_prefix}_INCLUDE_DIRS OR ${_prefix}_LINK_LIBRARIES OR ${_prefix}_LDFLAGS_OTHER OR ${_prefix}_CFLAGS_OTHER )) + if (NOT TARGET PkgConfig::${_prefix}) if(${_imp_target_global}) set(_global_opt "GLOBAL") else() |