pffft: Fix linkage on some systems

- Make pffft an object library instead
- Enable position independent code for pffft

Signed-off-by: Avery King <avery98@pm.me>
This commit is contained in:
Avery King
2025-01-03 18:12:36 -08:00
parent 6a24c7b74b
commit 02b8181b0e

View File

@@ -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)