steinbergmedia / vst3sdk

VST 3 Plug-In SDK
Other
1.59k stars 162 forks source link

CMAKE_TRY_COMPILE_TARGET_TYPE required to build on Mac OS X #41

Closed nealgriffin closed 3 years ago

nealgriffin commented 4 years ago

Hi all, I needed to included this line

set(CMAKE_TRY_COMPILE_TARGET_TYPE "STATIC_LIBRARY")

in my CMakeLists.txt file at the root directory of my VST3_SDK folder in order to get the sample files to build. Not sure if that is helpful for anyone else. Here is my configuration:

macosx 10.14.6 Mojave cmake: 3.15.4 gcc: Apple LLVM version 10.0.1 (clang-1001.0.46.4) xcode-select: version 2354 VST3: vstsdk3613_08_04_2019_build_81

and I'm following the instructions on 'how to build' in the project readme, specifically executing: cmake --build . --config Release from within a build directory created underneath the vst3 root.

The projects all do compile, however, the build process throws a ton of warnings of the type: ` falignpush.h:26:25: warning: pragma diagnostic expected 'error', 'warning', 'ignored', 'fatal', 'push', or 'pop' [-Wunknown-pragmas]

pragma GCC diagnostic default "-Wpragma-pack"

` Not sure if that is either helpful to anyone or if I actually may've configured something wrong, if the former, let me know and I'm happy to submit a PR to include this line.

scheffle commented 4 years ago

Hi, on macOS you need to use Xcode to build the SDK: cmake -GXcode ...