Skip to content
This repository was archived by the owner on Jul 11, 2022. It is now read-only.

Commit 45893f5

Browse files
committed
Fix Linux linking issues (again)
1 parent 9c8365c commit 45893f5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ target_compile_features(ObjectiveNinja PRIVATE cxx_std_17 c_std_99)
9494
target_compile_definitions(ObjectiveNinja PRIVATE
9595
DEV_MODE=${DEV_MODE})
9696

97-
# Plugins need to compile with position independent code on Linux.
97+
# Library targets linking against the Binary Ninja API need to be compiled with
98+
# position-independent code on Linux.
9899
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
100+
target_compile_options(ObjectiveNinjaCore PRIVATE "-fPIC")
99101
target_compile_options(ObjectiveNinja PRIVATE "-fPIC")
100102
endif()
101103

0 commit comments

Comments
 (0)