diff --git a/CMakeLists.txt b/CMakeLists.txt index 841e83da..cb85679b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()