Use -fPIC option when building shared libs
This commit is contained in:
1 parent
d121bbe709
commit
b206dd44f0
1 file changed
+4
@@ -76,6 +76,10 @@ if(UNIX)
|
||||
)
|
||||
target_compile_options(discord-rpc PRIVATE $<$<COMPILE_LANGUAGE:CXX>:-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)
|
||||
|
||||
Reference in new issue
Block a user