Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.7KB

  1. # DISTRHO Plugin Framework (DPF)
  2. # Copyright (C) 2021 Jean Pierre Cimalando <jp-dev@inbox.ru>
  3. # Copyright (C) 2022-2024 Filipe Coelho <falktx@falktx.com>
  4. #
  5. # SPDX-License-Identifier: ISC
  6. cmake_minimum_required(VERSION 3.7)
  7. project(DPF)
  8. # ensure c++11 at minimum, the parent project can override
  9. if(NOT CMAKE_CXX_STANDARD)
  10. set(CMAKE_CXX_STANDARD 11)
  11. endif()
  12. # check if we are building from this project, or are imported by another
  13. if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
  14. set(DPF_BUILD_FROM_HERE TRUE)
  15. else()
  16. set(DPF_BUILD_FROM_HERE FALSE)
  17. endif()
  18. option(DPF_LIBRARIES "Build the libraries" "${DPF_BUILD_FROM_HERE}")
  19. option(DPF_EXAMPLES "Build the examples" "${DPF_BUILD_FROM_HERE}")
  20. set(DPF_ROOT_DIR "${PROJECT_SOURCE_DIR}" CACHE INTERNAL
  21. "Root directory of the DISTRHO Plugin Framework.")
  22. list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
  23. include(DPF-plugin)
  24. if(DPF_LIBRARIES)
  25. find_package(PkgConfig)
  26. if(PKG_CONFIG_FOUND)
  27. pkg_check_modules(CAIRO "cairo")
  28. if(CAIRO_FOUND AND (NOT HAIKU))
  29. dpf__add_dgl_cairo(TRUE, TRUE)
  30. endif()
  31. endif()
  32. dpf__add_dgl_external(TRUE)
  33. dpf__add_dgl_opengl(TRUE, TRUE)
  34. endif()
  35. if(DPF_EXAMPLES)
  36. find_package(PkgConfig)
  37. if(PKG_CONFIG_FOUND)
  38. pkg_check_modules(CAIRO "cairo")
  39. if(CAIRO_FOUND AND (NOT HAIKU))
  40. add_subdirectory("examples/CairoUI")
  41. endif()
  42. endif()
  43. add_subdirectory("examples/EmbedExternalUI")
  44. add_subdirectory("examples/FileHandling")
  45. add_subdirectory("examples/Info")
  46. add_subdirectory("examples/Latency")
  47. add_subdirectory("examples/Meters")
  48. add_subdirectory("examples/MidiThrough")
  49. add_subdirectory("examples/Parameters")
  50. add_subdirectory("examples/States")
  51. add_subdirectory("examples/WebMeters")
  52. endif()