From 0c5b3f87e5bd99a25e1079e73309488f91116bb4 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Sat, 28 May 2022 09:48:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96cmake?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index 713e7ae6..7312e7f1 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -8,6 +8,9 @@ if (IOS) return() endif () +add_definitions(-DGENERATE_EXPORT) +include_directories(${CMAKE_BINARY_DIR}) + if (ENABLE_API_STATIC_LIB) add_definitions(-DMediaKitApi_STATIC) add_library(mk_api STATIC ${api_src_list}) @@ -21,8 +24,6 @@ else () target_link_libraries(mk_api jsoncpp ${LINK_LIB_LIST}) endif () -add_definitions(-DGENERATE_EXPORT) -include_directories(${CMAKE_BINARY_DIR}) generate_export_header(mk_api EXPORT_MACRO_NAME API_EXPORT BASE_NAME MK_API