diff --git a/distrho/DistrhoUIMain.cpp b/distrho/DistrhoUIMain.cpp index 572b62e4..13d337bb 100644 --- a/distrho/DistrhoUIMain.cpp +++ b/distrho/DistrhoUIMain.cpp @@ -1,6 +1,6 @@ /* * DISTRHO Plugin Framework (DPF) - * Copyright (C) 2012-2022 Filipe Coelho + * Copyright (C) 2012-2023 Filipe Coelho * * Permission to use, copy, modify, and/or distribute this software for any purpose with * or without fee is hereby granted, provided that the above copyright notice and this @@ -16,10 +16,13 @@ #include "src/DistrhoUI.cpp" -#if ! DISTRHO_PLUGIN_HAS_UI +// we might be building a plugin with external UI, which works on most formats except VST2/3 +#if ! DISTRHO_PLUGIN_HAS_UI && ! defined(DISTRHO_PLUGIN_VST_HPP_INCLUDED) # error Trying to build UI without DISTRHO_PLUGIN_HAS_UI set to 1 #endif +#if DISTRHO_PLUGIN_HAS_UI + #if defined(DISTRHO_PLUGIN_TARGET_CARLA) # define DISTRHO_PLUGIN_AND_UI_IN_SINGLE_OBJECT 1 #elif defined(DISTRHO_PLUGIN_TARGET_CLAP) @@ -51,3 +54,5 @@ # endif # include "src/DistrhoUtils.cpp" #endif + +#endif