INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_CURRENT_SOURCE_DIR}) ADD_DEFINITIONS(-DFFTW3) IF(LMMS_HAVE_FFTW3F) INCLUDE_DIRECTORIES(${FFTW3F_INCLUDE_DIRS}) LINK_DIRECTORIES(${FFTW3F_LIBRARY_DIRS}) LINK_LIBRARIES(-lfftw3f) ENDIF(LMMS_HAVE_FFTW3F) INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) FILE(GLOB PLUGIN_SOURCES *.c) FOREACH(_item ${PLUGIN_SOURCES}) GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE) IF(NOT "${_plugin}" STREQUAL "mbeq_1197" OR LMMS_HAVE_FFTW3F) ADD_LIBRARY(${_plugin} MODULE ${_item}) INSTALL(TARGETS ${_plugin} LIBRARY DESTINATION ${PLUGIN_DIR}/ladspa) SET_TARGET_PROPERTIES(${_plugin} PROPERTIES PREFIX "") SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "-O3 -Wall -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fno-strict-aliasing") IF(LMMS_BUILD_WIN32) ADD_CUSTOM_COMMAND(TARGET ${_plugin} POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/${_plugin}.dll) ELSE(LMMS_BUILD_WIN32) SET_TARGET_PROPERTIES(${_plugin} PROPERTIES COMPILE_FLAGS "${COMPILE_FLAGS} -fPIC -DPIC") ENDIF(LMMS_BUILD_WIN32) IF(LMMS_BUILD_APPLE) SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -Bsymbolic -lm") ELSE(LMMS_BUILD_APPLE) SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined -Wl,-Bsymbolic -lm") ENDIF(LMMS_BUILD_APPLE) IF(LMMS_BUILD_LINUX) SET_TARGET_PROPERTIES(${_plugin} PROPERTIES LINK_FLAGS "${LINK_FLAGS} -nostartfiles") ENDIF(LMMS_BUILD_LINUX) ENDIF(NOT "${_plugin}" STREQUAL "mbeq_1197" OR LMMS_HAVE_FFTW3F) ENDFOREACH(_item ${PLUGIN_SOURCES})