diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 3b96961..3839781 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -76,6 +76,10 @@ if(UNIX) ) target_compile_options(discord-rpc PRIVATE $<$:-std=c++14>) + if (${BUILD_SHARED_LIBS}) + target_compile_options(discord-rpc PRIVATE -fPIC) + endif (${BUILD_SHARED_LIBS}) + if (APPLE) target_link_libraries(discord-rpc PRIVATE "-framework AppKit") endif (APPLE)