--- plugins/zynaddsubfx/CMakeLists.txt.orig	2015-03-08 02:47:14 UTC
+++ plugins/zynaddsubfx/CMakeLists.txt
@@ -49,6 +49,7 @@ INCLUDE_DIRECTORIES("${FLTK_INCLUDE_DIR}
                     "${CMAKE_BINARY_DIR}")
 
 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/zynaddsubfx/src/UI)
+link_directories(${FFTW3F_LIBRARY_DIRS})
 
 ADD_DEFINITIONS(-DPLUGINVERSION)	# removes exit confirmation dialogs etc. in MasterUI.fl
 add_subdirectory(zynaddsubfx/src/Nio)
@@ -137,11 +138,6 @@ IF(LMMS_BUILD_WIN32)
 	TARGET_LINK_LIBRARIES(RemoteZynAddSubFx ${QT_LIBRARIES})
 ENDIF(LMMS_BUILD_WIN32)
 
-# FLTK needs X
-IF(LMMS_BUILD_LINUX)
-	TARGET_LINK_LIBRARIES(RemoteZynAddSubFx -ldl)
-ENDIF(LMMS_BUILD_LINUX)
-
 
 IF(LMMS_BUILD_WIN32)
 	ADD_CUSTOM_COMMAND(TARGET ZynAddSubFxCore POST_BUILD COMMAND "${STRIP}" "\"${CMAKE_CURRENT_BINARY_DIR}/libZynAddSubFxCore.dll\"")
