diff --git a/lib-src/pffft/CMakeLists.txt b/lib-src/pffft/CMakeLists.txt index df89f089e..09dedafc7 100644 --- a/lib-src/pffft/CMakeLists.txt +++ b/lib-src/pffft/CMakeLists.txt @@ -13,8 +13,12 @@ set(SOURCES pfsimd_macros.h ) -# Let's make this a library - a static library -add_library(pffft STATIC ${SOURCES}) +# Let's make this an object library so we don't deal with static library +# leftovers. +add_library(pffft OBJECT ${SOURCES}) # Yes, this is a hacky CMakeLists.txt target_include_Directories(pffft PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) + +# Set this or the build could fail on some systems otherwise. +set_target_properties(pffft PROPERTIES POSITION_INDEPENDENT_CODE ON)