From bf52d1ec32595329e7499dafa3e1f4e2a1922a1c Mon Sep 17 00:00:00 2001 From: Claes Johanson Date: Thu, 29 Nov 2018 10:17:06 +0100 Subject: [PATCH] Fixed #41 Remove VST 2.x SDK files --- .gitmodules | 3 -- README.md | 6 +++- premake5.lua | 85 +++++++++++++++++++++++++++------------------------- vst24sdk | 1 - 4 files changed, 50 insertions(+), 45 deletions(-) delete mode 160000 vst24sdk diff --git a/.gitmodules b/.gitmodules index 4cb2eb9828e..07adea5768b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "vst3sdk"] path = vst3sdk url = https://github.com/steinbergmedia/vst3sdk.git -[submodule "vst24sdk"] - path = vst24sdk - url = https://github.com/R-Tur/VST_SDK_2.4 diff --git a/README.md b/README.md index 819c81beca2..982716ae642 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Development Discussion at KVR-Forum [here](https://www.kvraudio.com/forum/viewto ## Preparation -First you need to grab all git submodules (needed to get the VST SDKs) +First you need to grab all git submodules (needed to get the VST3 SDK) ``` git submodule update --init --recursive @@ -78,3 +78,7 @@ Now, boot up Xcode and open the project. Let it do the indexing/processing. Choose `Update to recommended settings" for `surge-au`, `surge-vst2` and `surge-vst3`. Click on `Perform Changes`. After which "Here there be dragons" - Please, could anyone take this further? + +## Building - VST2 + +If you want to build VST2 versions of the plug-in, set the environment variable VST24SDK to the location of the SDK prior to building. \ No newline at end of file diff --git a/premake5.lua b/premake5.lua index af12f8f5639..9d2dfcfca5e 100644 --- a/premake5.lua +++ b/premake5.lua @@ -286,60 +286,65 @@ end -- VST2 PLUGIN -- -project "surge-vst2" -kind "SharedLib" -uuid "007990D5-2B46-481D-B38C-D83037CDF54B" +local VST24SDK = os.getenv("VST2SDK_DIR") -defines -{ - "TARGET_VST2=1", -} +if VST24SDK then -plugincommon() + project "surge-vst2" + kind "SharedLib" + uuid "007990D5-2B46-481D-B38C-D83037CDF54B" -files { - "src/vst2/**.cpp", - "src/vst2/**.h", - "vst24sdk/public.sdk/source/vst2.x/**.cpp", - "vst3sdk/public.sdk/source/vst2.x/**.cpp", - VSTGUI .. "plugin-bindings/aeffguieditor.cpp", + defines + { + "TARGET_VST2=1", } -excludes { - VSTGUI .. "plugguieditor.cpp", -} + plugincommon() -includedirs { - "src/vst2", - "vst24sdk", - "vst3sdk" -} + files { + "src/vst2/**.cpp", + "src/vst2/**.h", + VST24SDK .. "/public.sdk/source/vst2.x/**.cpp", + "vst3sdk/public.sdk/source/vst2.x/**.cpp", + VSTGUI .. "plugin-bindings/aeffguieditor.cpp", + } -configuration { "Debug" } -targetdir "target/vst2/Debug" -targetsuffix "-Debug" + excludes { + VSTGUI .. "plugguieditor.cpp", + } -configuration { "Release" } -targetdir "target/vst2/Release" + includedirs { + "src/vst2", + VST24SDK, + "vst3sdk" + } -configuration {} + configuration { "Debug" } + targetdir "target/vst2/Debug" + targetsuffix "-Debug" + configuration { "Release" } + targetdir "target/vst2/Release" -if (os.istarget("macosx")) then + configuration {} - targetname "Surge" - targetprefix "" - postbuildcommands { "./package-vst.sh" } - - files - { - "libs/vst/*.mm" - } - -elseif (os.istarget("windows")) then - linkoptions { "/DEF:resources\\windows-vst2\\surge.def" } + if (os.istarget("macosx")) then + + targetname "Surge" + targetprefix "" + postbuildcommands { "./package-vst.sh" } + + files + { + "libs/vst/*.mm" + } + + elseif (os.istarget("windows")) then + + linkoptions { "/DEF:resources\\windows-vst2\\surge.def" } + end end -- VST3 PLUGIN -- diff --git a/vst24sdk b/vst24sdk deleted file mode 160000 index 4610873fa43..00000000000 --- a/vst24sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4610873fa433d263a5c4a68b5b8b59ffcf6ca6db