ZynAddSubFX: link fftw3f after ZASF core libs

Commit 3c18e436cd makes it impossible to
build LMMS with embedded ZynAddSubFX if "-Wl,--as-needed" is used in
LINKER_FLAGS during the link step of RemoteZynAddSubFx:

  Linking CXX executable RemoteZynAddSubFx
  libZynAddSubFxCore.so: undefined reference to `fftwf_plan_r2r_1d'
  libZynAddSubFxCore.so: undefined reference to `fftwf_execute'
  libZynAddSubFxCore.so: undefined reference to `fftwf_destroy_plan'

This happens because fftw3f, which is a system lib, is linked to before
the ZASF core libs when linking RemoteZynAddSubFx. With "--as-needed",
correct library order matters.
(cherry picked from commit 0f28295ac7)
This commit is contained in:
Nikos Chantziaras
2009-09-23 14:27:15 +02:00
committed by Tobias Doerffel
parent 40331b0cdd
commit 4849c9a11b

View File

@@ -90,7 +90,7 @@ add_subdirectory(src/DSP)
add_subdirectory(src/Samples)
ADD_LIBRARY(ZynAddSubFxCore SHARED LocalZynAddSubFx.cpp ${MXML_SRC})
TARGET_LINK_LIBRARIES(ZynAddSubFxCore ${FFTW3F_LIBRARIES} ${ZASF_CORE_LIBS} -lz -lpthread)
TARGET_LINK_LIBRARIES(ZynAddSubFxCore ${ZASF_CORE_LIBS} ${FFTW3F_LIBRARIES} -lz -lpthread)
IF(LMMS_BUILD_WIN32)
TARGET_LINK_LIBRARIES(ZynAddSubFxCore -lwsock32)
INSTALL(TARGETS ZynAddSubFxCore DESTINATION ${PLUGIN_DIR})