CMakeLists.txt 993 B

1234567891011121314151617181920212223
  1. INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include")
  2. FILE(GLOB PLUGIN_SOURCES tap-plugins/*.c)
  3. LIST(SORT PLUGIN_SOURCES)
  4. SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -Wno-write-strings -fomit-frame-pointer -fno-strict-aliasing -funroll-loops -ffast-math")
  5. FOREACH(_item ${PLUGIN_SOURCES})
  6. GET_FILENAME_COMPONENT(_plugin "${_item}" NAME_WE)
  7. ADD_LIBRARY("${_plugin}" MODULE "${_item}")
  8. # TAP pinknoise will re-init srand(); use existing seed instead
  9. IF("${_plugin}" MATCHES "tap_pinknoise")
  10. TARGET_COMPILE_DEFINITIONS("${_plugin}" PRIVATE TAP_DISABLE_SRAND=1)
  11. ENDIF()
  12. INSTALL(TARGETS "${_plugin}" LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
  13. SET_TARGET_PROPERTIES("${_plugin}" PROPERTIES PREFIX "")
  14. # Don't strip if "Debug" or "RelWithDebInfo"
  15. IF(LMMS_BUILD_WIN32 AND NOT CMAKE_BUILD_TYPE MATCHES "Deb")
  16. ADD_CUSTOM_COMMAND(TARGET "${_plugin}" POST_BUILD COMMAND "${STRIP}" \"$<TARGET_FILE:${_plugin}>\")
  17. ENDIF()
  18. IF(NOT MSVC)
  19. TARGET_LINK_LIBRARIES("${_plugin}" m)
  20. ENDIF()
  21. ENDFOREACH()