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