FindPkgConfig: Update cache variables after isystem extraction

Fixes: #25377
This commit is contained in:
Kai Pastor
2023-12-28 10:41:12 +01:00
parent 8fe6196714
commit e50aaf8547

View File

@@ -667,6 +667,9 @@ macro(_pkg_check_modules_internal _is_required _is_silent _no_cmake_path _no_cma
if (${_prefix}_CFLAGS_OTHER MATCHES "-isystem")
_pkgconfig_extract_isystem("${_prefix}")
# Using _pkgconfig_set in this scope so that a future policy can switch to normal variables
_pkgconfig_set("${_pkg_check_prefix}_CFLAGS_OTHER" "${${_pkg_check_prefix}_CFLAGS_OTHER}")
_pkgconfig_set("${_pkg_check_prefix}_INCLUDE_DIRS" "${${_pkg_check_prefix}_INCLUDE_DIRS}")
endif ()
_pkg_recalculate("${_prefix}" ${_no_cmake_path} ${_no_cmake_environment_path} ${_imp_target} ${_imp_target_global})