mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-15 11:10:19 -06:00
Merge topic 'imported-framework-dir-is-system'
878ae03832 macOS: IMPORTED framework: Honor SYSTEM target property in all cases
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8758
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