steinbergmedia / vst3sdk

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

Build Failed: with fresh install of mac osx Mojave #35

Closed woodybriggs closed 5 years ago

woodybriggs commented 5 years ago

Issue: On a clean install of Mac osx Mojave, simply cloning the directory and trying to build with command line tools will fail. Due to deployment target being 10.8 not 10.9

Steps to reproduce:

  1. Clean install of mac osx mojave or remove all xcode and old command line tools.
  2. Install 10.14 xcode command line tools
  3. Clone vst3sdk
  4. Try build with cmake -DCMAKE_BUILD_TYPE=DEBUG ../

Expected Output Successful build

Actual Output

"/Library/Developer/CommandLineTools/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

...

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

My resolution: vst3sdk/cmake/modules/Global.cmake Line 81:49 set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "macOS deployment target") rather than et(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "macOS deployment target")

After this change running cmake -DCMAKE_BUILD_TYPE=DEBUG ../ the build runs successfuly

scheffle commented 5 years ago

Hi, please set the environment variable "MACOSX_DEPLOYMENT_TARGET" before executing cmake like this: export MACOSX_DEPLOYMENT_TARGET=10.9