diff options
author | Adam Badura <adam.badura@nokia.com> | 2021-05-05 05:17:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-06-04 12:33:27 (GMT) |
commit | 6f14205e0885853184d482f901d62fa5c10ac4f9 (patch) | |
tree | 39e9ec271c6387a8bb617bc709d41fed9fd29b38 /Modules | |
parent | 07d639072800dcd189a9c461c4d1e0c04807e18f (diff) | |
download | CMake-6f14205e0885853184d482f901d62fa5c10ac4f9.zip CMake-6f14205e0885853184d482f901d62fa5c10ac4f9.tar.gz CMake-6f14205e0885853184d482f901d62fa5c10ac4f9.tar.bz2 |
FindPkgConfig: Always create the imported target
Fixes: #22180
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() |