From 0ac2adbc9076a9774414dcaff05ec83eb3d0e51b Mon Sep 17 00:00:00 2001 From: AnClark Liu Date: Tue, 13 Dec 2022 23:13:49 +0800 Subject: [PATCH] Build ExternalUI and EmbedExternalUI example plugins with cmake Note: Build CLAP versions as well. --- CMakeLists.txt | 3 ++- examples/EmbedExternalUI/CMakeLists.txt | 13 +++++++++++++ examples/EmbedExternalUI/DistrhoPluginInfo.h | 1 + examples/ExternalUI/CMakeLists.txt | 13 +++++++++++++ examples/ExternalUI/DistrhoPluginInfo.h | 1 + 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 examples/EmbedExternalUI/CMakeLists.txt create mode 100644 examples/ExternalUI/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 85b18ac5..26b0104f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,7 +39,8 @@ if(DPF_EXAMPLES) if(NOT (WIN32 OR APPLE)) # TODO skip this one for now add_subdirectory("examples/CairoUI") endif() - #add_subdirectory("examples/ExternalUI") + add_subdirectory("examples/ExternalUI") + add_subdirectory("examples/EmbedExternalUI") add_subdirectory("examples/FileHandling") add_subdirectory("examples/Info") add_subdirectory("examples/Latency") diff --git a/examples/EmbedExternalUI/CMakeLists.txt b/examples/EmbedExternalUI/CMakeLists.txt new file mode 100644 index 00000000..f7720813 --- /dev/null +++ b/examples/EmbedExternalUI/CMakeLists.txt @@ -0,0 +1,13 @@ +# CMake file for DISTRHO Plugins # +# ------------------------------ # + +dpf_add_plugin(d_embed_external_ui + TARGETS lv2 vst2 vst3 clap + UI_TYPE external + FILES_DSP + EmbedExternalExamplePlugin.cpp + FILES_UI + EmbedExternalExampleUI.cpp) + +target_include_directories( + d_embed_external_ui PUBLIC ".") diff --git a/examples/EmbedExternalUI/DistrhoPluginInfo.h b/examples/EmbedExternalUI/DistrhoPluginInfo.h index 29deffed..ab813122 100644 --- a/examples/EmbedExternalUI/DistrhoPluginInfo.h +++ b/examples/EmbedExternalUI/DistrhoPluginInfo.h @@ -20,6 +20,7 @@ #define DISTRHO_PLUGIN_BRAND "DISTRHO" #define DISTRHO_PLUGIN_NAME "EmbedExternalUI" #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/EmbedExternalUI" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.embed-external-ui" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_HAS_EMBED_UI 1 diff --git a/examples/ExternalUI/CMakeLists.txt b/examples/ExternalUI/CMakeLists.txt new file mode 100644 index 00000000..ab56f635 --- /dev/null +++ b/examples/ExternalUI/CMakeLists.txt @@ -0,0 +1,13 @@ +# CMake file for DISTRHO Plugins # +# ------------------------------ # + +dpf_add_plugin(d_external_ui + TARGETS lv2 vst2 vst3 clap + UI_TYPE external + FILES_DSP + ExternalExamplePlugin.cpp + FILES_UI + ExternalExampleUI.cpp) + +target_include_directories( + d_external_ui PUBLIC ".") diff --git a/examples/ExternalUI/DistrhoPluginInfo.h b/examples/ExternalUI/DistrhoPluginInfo.h index 82834d8c..253eb158 100644 --- a/examples/ExternalUI/DistrhoPluginInfo.h +++ b/examples/ExternalUI/DistrhoPluginInfo.h @@ -20,6 +20,7 @@ #define DISTRHO_PLUGIN_BRAND "DISTRHO" #define DISTRHO_PLUGIN_NAME "ExternalUI" #define DISTRHO_PLUGIN_URI "http://distrho.sf.net/examples/ExternalUI" +#define DISTRHO_PLUGIN_CLAP_ID "studio.kx.distrho.examples.external-ui" #define DISTRHO_PLUGIN_HAS_UI 1 #define DISTRHO_PLUGIN_HAS_EMBED_UI 1