diff options
Diffstat (limited to 'cmake/mbgl.cmake')
-rw-r--r-- | cmake/mbgl.cmake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmake/mbgl.cmake b/cmake/mbgl.cmake index 7f7d820a68..d853950c0d 100644 --- a/cmake/mbgl.cmake +++ b/cmake/mbgl.cmake @@ -95,6 +95,16 @@ function(_get_xcconfig_property target var) get_property(result TARGET ${target} PROPERTY INTERFACE_${var} SET) if (result) get_property(result TARGET ${target} PROPERTY INTERFACE_${var}) + if (var STREQUAL "LINK_LIBRARIES") + # Remove target names from the list of linker flags, since Xcode can't deal with them. + set(link_flags) + foreach(item IN LISTS result) + if (NOT TARGET ${item}) + list(APPEND link_flags ${item}) + endif() + endforeach() + set(result "${link_flags}") + endif() string(REPLACE ";-framework " ";-framework;" result "${result}") string(REPLACE ";" "\" \"" result "${result}") string(REPLACE "-" "_" target "${target}") |