From 0b33769ee91c4c74b94e655d6f970e2b4b695e02 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Mon, 25 Jul 2022 13:54:24 +0800 Subject: [PATCH] =?UTF-8?q?cmake:=20=E5=BA=93=E5=88=97=E8=A1=A8=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Android/app/src/main/cpp/CMakeLists.txt | 2 +- CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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})