仅在有 parent 时设置到 parent 中 (#2676)

This commit is contained in:
Xiaofeng Wang 2023-07-19 22:38:28 +08:00 committed by GitHub
parent 7b1a4d23e1
commit 75e41bf3b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -462,7 +462,7 @@ if(ENABLE_SERVER)
endif()
# Android add_subdirectory
if(ENABLE_SERVER_LIB)
if(ENABLE_SERVER_LIB AND NOT CMAKE_PARENT_LIST_FILE STREQUAL CMAKE_CURRENT_LIST_FILE)
set(MK_LINK_LIBRARIES ${MK_LINK_LIBRARIES} PARENT_SCOPE)
endif()