From 97bf82e54cabc1e292d5866fb9555008a87149d4 Mon Sep 17 00:00:00 2001 From: xiongziliang <771730766@qq.com> Date: Wed, 18 Dec 2019 10:19:08 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B0=9D=E8=AF=95=E4=BF=AE=E5=A4=8Dlinux?= =?UTF-8?q?=E7=BC=96=E8=AF=91=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/CMakeLists.txt b/api/CMakeLists.txt index 03901c12..233a8580 100644 --- a/api/CMakeLists.txt +++ b/api/CMakeLists.txt @@ -2,6 +2,10 @@ file(GLOB api_src_list include/*.h source/*.cpp source/*.h source/*.c) add_library(api SHARED ${api_src_list}) +if (CMAKE_SYSTEM_NAME MATCHES "Linux") + add_compile_options(-fPIC) +endif() + if(WIN32) add_definitions(-DMediaKitApi_EXPORTS) endif()