mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
@@ -911,6 +911,9 @@ std::pair<bool, bool> PopulatePCTarget(PopulateArguments& args,
|
||||
auto& pcEnv = maybeEnv->first;
|
||||
auto& imEnv = maybeEnv->second;
|
||||
|
||||
pcEnv.AllowSysCflags = true;
|
||||
pcEnv.AllowSysLibs = true;
|
||||
|
||||
pkgProviders providers;
|
||||
if (args.Providers) {
|
||||
for (auto const& provider_str : *args.Providers) {
|
||||
|
11
Tests/RunCMake/cmake_pkg_config/ImportSystem-check.cmake
Normal file
11
Tests/RunCMake/cmake_pkg_config/ImportSystem-check.cmake
Normal file
@@ -0,0 +1,11 @@
|
||||
set(expected
|
||||
"Include Directories: /TestDirectories/Include
|
||||
Link Directories: /TestDirectories/Library
|
||||
"
|
||||
)
|
||||
|
||||
file(READ "${RunCMake_TEST_BINARY_DIR}/import-system.txt" actual)
|
||||
|
||||
if(NOT(expected STREQUAL actual))
|
||||
set(RunCMake_TEST_FAILED "cmake_pkg_config import-system.txt does not match expected:\n${actual}")
|
||||
endif()
|
12
Tests/RunCMake/cmake_pkg_config/ImportSystem.cmake
Normal file
12
Tests/RunCMake/cmake_pkg_config/ImportSystem.cmake
Normal file
@@ -0,0 +1,12 @@
|
||||
set(CMAKE_PKG_CONFIG_SYS_INCLUDE_DIRS /TestDirectories/Include)
|
||||
set(CMAKE_PKG_CONFIG_SYS_LIB_DIRS /TestDirectories/Library)
|
||||
|
||||
cmake_pkg_config(IMPORT import-simple REQUIRED)
|
||||
|
||||
file(GENERATE
|
||||
OUTPUT import-system.txt
|
||||
CONTENT
|
||||
"Include Directories: $<TARGET_PROPERTY:PkgConfig::import-simple,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
Link Directories: $<TARGET_PROPERTY:PkgConfig::import-simple,INTERFACE_LINK_DIRECTORIES>
|
||||
"
|
||||
)
|
@@ -20,6 +20,7 @@ run_cmake(ImportName)
|
||||
run_cmake(ImportPrefix)
|
||||
run_cmake(ImportRequires)
|
||||
run_cmake(ImportSimple)
|
||||
run_cmake(ImportSystem)
|
||||
run_cmake(ImportTransitiveFail)
|
||||
run_cmake(ImportTransitiveVersion)
|
||||
run_cmake(ImportTransitiveVersionFail)
|
||||
|
Reference in New Issue
Block a user