CMakeLists.txt 995 B

1234567891011121314151617181920212223
  1. FILE(GLOB SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
  2. LIST(SORT SOURCES)
  3. ADD_LIBRARY(calf MODULE ${SOURCES})
  4. INCLUDE_DIRECTORIES("${CMAKE_SOURCE_DIR}/include"
  5. "${CMAKE_BINARY_DIR}"
  6. "${CMAKE_CURRENT_SOURCE_DIR}"
  7. "${CMAKE_CURRENT_SOURCE_DIR}/src")
  8. INSTALL(TARGETS calf LIBRARY DESTINATION "${PLUGIN_DIR}/ladspa")
  9. SET_TARGET_PROPERTIES(calf PROPERTIES PREFIX "")
  10. SET(INLINE_FLAGS "")
  11. IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
  12. SET(INLINE_FLAGS "-finline-functions-called-once -finline-limit=80")
  13. ENDIF()
  14. SET_TARGET_PROPERTIES(calf PROPERTIES COMPILE_FLAGS "-O2 -finline-functions ${INLINE_FLAGS}")
  15. IF(LMMS_BUILD_WIN32)
  16. ADD_CUSTOM_COMMAND(TARGET calf POST_BUILD COMMAND "${STRIP}" "$<TARGET_FILE:calf>")
  17. ENDIF(LMMS_BUILD_WIN32)
  18. IF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)
  19. SET_TARGET_PROPERTIES(calf PROPERTIES LINK_FLAGS "${LINK_FLAGS} -shared -Wl,-no-undefined")
  20. ENDIF(NOT LMMS_BUILD_APPLE AND NOT LMMS_BUILD_OPENBSD)