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()