mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CMake: Link CoreServices weakly when building for iOS 11 or lower
This commit is contained in:
parent
b5c0c75a5b
commit
cb399a57ff
1 changed files with 8 additions and 1 deletions
|
|
@ -482,7 +482,14 @@ function(_juce_link_frameworks target visibility)
|
|||
find_library("juce_found_${framework}" "${framework}" REQUIRED)
|
||||
target_link_libraries("${target}" "${visibility}" "${juce_found_${framework}}")
|
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
target_link_libraries("${target}" "${visibility}" "-framework ${framework}")
|
||||
# CoreServices is only available on iOS 12+, we must link it weakly on earlier platforms
|
||||
if((framework STREQUAL "CoreServices") AND (CMAKE_OSX_DEPLOYMENT_TARGET LESS 12.0))
|
||||
set(framework_flags "-weak_framework ${framework}")
|
||||
else()
|
||||
set(framework_flags "-framework ${framework}")
|
||||
endif()
|
||||
|
||||
target_link_libraries("${target}" "${visibility}" "${framework_flags}")
|
||||
endif()
|
||||
endforeach()
|
||||
endfunction()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue