diff --git a/Android/app/src/main/cpp/CMakeLists.txt b/Android/app/src/main/cpp/CMakeLists.txt index aa3169cb..6db855a6 100644 --- a/Android/app/src/main/cpp/CMakeLists.txt +++ b/Android/app/src/main/cpp/CMakeLists.txt @@ -36,5 +36,5 @@ file(GLOB JNI_src_list ${JNI_Root}/*.cpp ${JNI_Root}/*.h) add_library(zlmediakit_jni SHARED ${JNI_src_list}) #链接 -target_link_libraries(zlmediakit_jni -Wl,--start-group log z ${LINK_LIB_LIST} -Wl,--end-group) +target_link_libraries(zlmediakit_jni -Wl,--start-group log z ${MK_LINK_LIBRARIES} -Wl,--end-group) diff --git a/CMakeLists.txt b/CMakeLists.txt index 85393d38..ce476074 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -419,6 +419,11 @@ if(NOT IOS) endif() add_subdirectory(server) + # Android 会 add_subdirectory 并依赖该变量 + if(ENABLE_SERVER_LIB) + set(MK_LINK_LIBRARIES ${MK_LINK_LIBRARIES} PARENT_SCOPE) + endif() + # 复制文件过来 file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/www" DESTINATION ${EXECUTABLE_OUTPUT_PATH})