Skip to content

Commit

Permalink
Fixup: Re-add -fPIC
Browse files Browse the repository at this point in the history
Fixup of c00fdb1

The mentioned commit removes the `-fPIC` flag, but this is needed in
Zyn: Even though zyn links rtosc as a `.a` file, the plugin versions are
shared objects and do require that every part, including rtosc is
compiled with `-fPIC`.

On the other side it is desired to compile rtosc as a `.a` into zyn to
be able to use link time optimization (LTO) and for distributional
reasons.
  • Loading branch information
JohannesLorenz authored and fundamental committed Dec 29, 2024
1 parent b212d2a commit 8c9eab8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ target_compile_features(rtosc-cpp PUBLIC cxx_std_11)
target_include_directories(rtosc PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
target_compile_options(rtosc PRIVATE
"$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-std=c99>")
set_target_properties(rtosc PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(rtosc-cpp PROPERTIES POSITION_INDEPENDENT_CODE ON)

if(RTOSC_IWYU_PATH AND RTOSC_INCLUDE_WHAT_YOU_USE)
set(RTOSC_IWYU_PATH_AND_OPTIONS
Expand Down

0 comments on commit 8c9eab8

Please sign in to comment.