mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 00:11:07 -06:00
macOS: IMPORTED framework: Honor SYSTEM target property in all cases
When IMPORTED_LOCATION holds a framework folder, SYSTEM property must be respected.
This commit is contained in:
@@ -797,10 +797,10 @@ void handleSystemIncludesDep(cmLocalGenerator* lg,
|
||||
*dirs, lg, config, headTarget, dagChecker, depTgt, language));
|
||||
}
|
||||
|
||||
if (depTgt->Target->IsFrameworkOnApple()) {
|
||||
if (depTgt->Target->IsFrameworkOnApple() ||
|
||||
depTgt->IsImportedFrameworkFolderOnApple(config)) {
|
||||
if (auto fwDescriptor = depTgt->GetGlobalGenerator()->SplitFrameworkPath(
|
||||
depTgt->GetLocation(config),
|
||||
cmGlobalGenerator::FrameworkFormat::Strict)) {
|
||||
depTgt->GetLocation(config))) {
|
||||
result.push_back(fwDescriptor->Directory);
|
||||
result.push_back(fwDescriptor->GetFrameworkPath());
|
||||
}
|
||||
|
||||
@@ -22,3 +22,15 @@ set_target_properties(Example::Example2 PROPERTIES
|
||||
add_library(testcase2 FrameworkSystemIncludeTest.c)
|
||||
target_compile_options(testcase2 PRIVATE "-Werror=#pragma-messages")
|
||||
target_link_libraries(testcase2 PRIVATE Example::Example2)
|
||||
|
||||
|
||||
|
||||
add_library(Example::Example3 SHARED IMPORTED)
|
||||
set_target_properties(Example::Example3 PROPERTIES
|
||||
FRAMEWORK 1
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/subdir/Example.framework"
|
||||
)
|
||||
|
||||
add_library(testcase3 FrameworkSystemIncludeTest.c)
|
||||
target_compile_options(testcase3 PRIVATE "-Werror=#pragma-messages")
|
||||
target_link_libraries(testcase3 PRIVATE Example::Example3)
|
||||
|
||||
Reference in New Issue
Block a user