comparison DPF-Prymula-audioplugins/dpf/CMakeLists.txt @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
1 # DISTRHO Plugin Framework (DPF)
2 # Copyright (C) 2021 Jean Pierre Cimalando <jp-dev@inbox.ru>
3 #
4 # SPDX-License-Identifier: ISC
5
6 cmake_minimum_required(VERSION 3.7)
7
8 project(DPF)
9
10 # ensure c++11 at minimum, the parent project can override
11 if(NOT CMAKE_CXX_STANDARD)
12 set(CMAKE_CXX_STANDARD 11)
13 endif()
14
15 # check if we are building from this project, or are imported by another
16 if(PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
17 set(DPF_BUILD_FROM_HERE TRUE)
18 else()
19 set(DPF_BUILD_FROM_HERE FALSE)
20 endif()
21
22 option(DPF_LIBRARIES "Build the libraries" "${DPF_BUILD_FROM_HERE}")
23 option(DPF_EXAMPLES "Build the examples" "${DPF_BUILD_FROM_HERE}")
24
25 set(DPF_ROOT_DIR "${PROJECT_SOURCE_DIR}" CACHE INTERNAL
26 "Root directory of the DISTRHO Plugin Framework.")
27
28 list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
29 include(DPF-plugin)
30
31 if(DPF_LIBRARIES)
32 find_package(PkgConfig)
33 if(PKG_CONFIG_FOUND)
34 pkg_check_modules(CAIRO "cairo")
35 if(CAIRO_FOUND AND (NOT HAIKU))
36 dpf__add_dgl_cairo(FALSE)
37 endif()
38 endif()
39 dpf__add_dgl_opengl(FALSE)
40 endif()
41
42 if(DPF_EXAMPLES)
43 find_package(PkgConfig)
44 if(PKG_CONFIG_FOUND)
45 pkg_check_modules(CAIRO "cairo")
46 if(CAIRO_FOUND AND (NOT HAIKU))
47 add_subdirectory("examples/CairoUI")
48 endif()
49 endif()
50 if((NOT WIN32) AND (NOT APPLE))
51 add_subdirectory("examples/ExternalUI")
52 endif()
53 add_subdirectory("examples/EmbedExternalUI")
54 add_subdirectory("examples/FileHandling")
55 add_subdirectory("examples/Info")
56 add_subdirectory("examples/Latency")
57 add_subdirectory("examples/Meters")
58 add_subdirectory("examples/MidiThrough")
59 add_subdirectory("examples/Parameters")
60 add_subdirectory("examples/States")
61 endif()