git » vst3sdk.git » commit 13cfeb6

fix build error when -DCMAKE_BUILD_TYPE=None is used

author Christian Heusel
2023-07-28 10:26:51 UTC
committer Christian Heusel
2023-07-28 10:46:04 UTC
parent 6823eb03836bc84da53909a95d2aa3771afa27eb

fix build error when -DCMAKE_BUILD_TYPE=None is used

Signed-off-by: Christian Heusel <gromit@archlinux.org>

PKGBUILD +8 -0
vst3sdk-3.7.8_build_34-cmake-build-type-none.patch +12 -0

diff --git a/PKGBUILD b/PKGBUILD
index 974c8f0..6cc2adf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -20,6 +20,7 @@ source=(
   git+https://github.com/steinbergmedia/vst3_pluginterfaces
   git+https://github.com/steinbergmedia/vst3_public_sdk
   git+https://github.com/steinbergmedia/vstgui
+  "vst3sdk-3.7.8_build_34-cmake-build-type-none.patch"
   $pkgname.pc
 )
 sha512sums=('SKIP'
@@ -29,6 +30,7 @@ sha512sums=('SKIP'
             'SKIP'
             'SKIP'
             'SKIP'
+            'e9417955746b231274f6f3d64cd06e22b79eaca25821b5f223668f79b67b9bbc932ce836922a464fd2f43b64fffaf18e1f5d879f8378e68305a4ac67586d089e'
             '501dff8299ccf9aeba61a64331c3ac74ece89eee956bffff0e303653b566acfca5cba4957c8bafb883efe6cc78c34da64ec9870daf9f2c37e2734110b9cad1dd')
 b2sums=('SKIP'
         'SKIP'
@@ -37,6 +39,7 @@ b2sums=('SKIP'
         'SKIP'
         'SKIP'
         'SKIP'
+        'c8ede1c4e023fe85e55774e46c6e332241bc10c93fa5b044524381a5146aa3cc39ff85b39098cf8f2916eaf35e9b22bd4f9bb80df49ff515a9ef85c0e11cd4bf'
         'e39e1353fdc22f7d93b6f89f8242fafddd56422a03df1cb26e81a3874456c49029a3726b43223fe21231eff6fe240e1216f3dca36a0e5297c9c0d43ab390bcd9')
 
 prepare() {
@@ -53,6 +56,11 @@ prepare() {
   git config submodule.public.sdk.url ../vst3_public_sdk
   git config submodule.vstgui4.url ../vstgui
   git -c protocol.file.allow=always submodule update
+
+  # the build currently fails for packages that set -DCMAKE_BUILD_TYPE other
+  # than Debug, Release or ReleaseLTO as the release modes are hardcoded in
+  # vst3sdk. This patch also adds support for build type "None"
+  patch --forward --strip=2 --input="${srcdir}/vst3sdk-3.7.8_build_34-cmake-build-type-none.patch"
 }
 
 package_vst3sdk() {
diff --git a/vst3sdk-3.7.8_build_34-cmake-build-type-none.patch b/vst3sdk-3.7.8_build_34-cmake-build-type-none.patch
new file mode 100644
index 0000000..73af83b
--- /dev/null
+++ b/vst3sdk-3.7.8_build_34-cmake-build-type-none.patch
@@ -0,0 +1,12 @@
+diff --color --unified --recursive --text src/vst3sdk/public.sdk/samples/vst-hosting/inspectorapp/CMakeLists.txt package.new/vst3sdk/public.sdk/samples/vst-hosting/inspectorapp/CMakeLists.txt
+--- src/vst3sdk/public.sdk/samples/vst-hosting/inspectorapp/CMakeLists.txt	2023-07-28 11:17:15.331067137 +0200
++++ package.new/vst3sdk/public.sdk/samples/vst-hosting/inspectorapp/CMakeLists.txt	2023-07-28 11:16:53.154300021 +0200
+@@ -52,7 +52,7 @@
+     if(NOT SMTG_MAC)
+         set_target_properties(${target}
+             PROPERTIES
+-                RUNTIME_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${CMAKE_BINARY_DIR}/bin/Debug/>$<$<CONFIG:Release>:${CMAKE_BINARY_DIR}/bin/Release/>$<$<CONFIG:ReleaseLTO>:${CMAKE_BINARY_DIR}/bin/ReleaseLTO/>/VST3Inspector
++                RUNTIME_OUTPUT_DIRECTORY $<$<CONFIG:Debug>:${CMAKE_BINARY_DIR}/bin/Debug/>$<$<CONFIG:Release>:${CMAKE_BINARY_DIR}/bin/Release/>$<$<CONFIG:ReleaseLTO>:${CMAKE_BINARY_DIR}/bin/ReleaseLTO/>$<$<CONFIG:None>:${CMAKE_BINARY_DIR}/bin/None/>/VST3Inspector
+         )
+     endif(NOT SMTG_MAC)
+