diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e9902a8e..6cad847d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -798,6 +798,13 @@ endif() if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows" ) find_package( GLIB REQUIRED ) find_package( GTK 3.0 REQUIRED ) + pkg_check_modules(GDK3_X11 gdk-x11-3.0) +endif() + +if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows" ) + cmake_dependent_option( USE_VST "Use VST2 plug-in support [ON, OFF]" ON "GDK3_X11_FOUND" OFF) +else() + cmd_option( USE_VST "Use VST2 plug-in support [ON, OFF]" ON) endif() if( NOT WIN32 ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 7963d60f5..ae4a60979 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,10 +57,6 @@ endif() cmd_option( use_ladspa "Use LADSPA plug-in support [ON, OFF]" ON ) set( USE_LADSPA ${use_ladspa} CACHE INTERNAL "" ) -# Handle VST option -cmd_option( use_vst "Use VST2 plug-in support [ON, OFF]" ON ) -set( USE_VST ${use_vst} CACHE INTERNAL "" ) - # ~~~ # General source files # ~~~