Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v4] Fix for CMake error when calling set_property on aliased targets #20667

Open
wants to merge 8 commits into
base: v4
Choose a base branch
from
12 changes: 9 additions & 3 deletions cmake/Modules/CocosBuildHelpers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ function(search_depend_libs_recursive cocos_target all_depends_out)
break()
endif()
endwhile(true)
list(REMOVE_DUPLICATES all_depends_inner)
set(${all_depends_out} ${all_depends_inner} PARENT_SCOPE)
endfunction()

Expand All @@ -149,7 +150,7 @@ function(get_target_depends_ext_dlls cocos_target all_depend_dlls_out)
endif()
endif()
endforeach()

list(REMOVE_DUPLICATES all_depend_ext_dlls)
set(${all_depend_dlls_out} ${all_depend_ext_dlls} PARENT_SCOPE)
endfunction()

Expand Down Expand Up @@ -278,8 +279,13 @@ endmacro()
# custom Xcode property for iOS target
macro(cocos_config_target_xcode_property cocos_target)
if(IOS)
set_xcode_property(${cocos_target} ENABLE_BITCODE "NO")
set_xcode_property(${cocos_target} ONLY_ACTIVE_ARCH "YES")
set(real_target)
get_property(real_target TARGET ${cocos_target} PROPERTY ALIASED_TARGET)
if (NOT real_target)
set(real_target ${cocos_target})
endif()
set_xcode_property(${real_target} ENABLE_BITCODE "NO")
set_xcode_property(${real_target} ONLY_ACTIVE_ARCH "YES")
endif()
endmacro()

Expand Down