steinbergmedia / vst3sdk

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

VST3_Project_Generator on OSX, CMAKE problem (and a temporay solution) #69

Closed ludiccc closed 3 years ago

ludiccc commented 3 years ago

Hi! I'm using VST 3 SDK within an OSX 11.1 (Big Sur), with Xcode 12.3 and cmake 3.13.4.

When I run VST Project Generator, I get an error. The script doesn't find the CMAKE_C_COMPILER and CMAKE_CXX_COMPILER variables.

The solution that I found was to edit the CMakeLists.txt.in file that is in

VST_SDK/VST3_Project_Generator/macOS/VST3_Project_Generator.app/Contents/Resources/cmake/templates/vst3plugin_folder

and add the following entries:

set(CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc")
set(CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++")

I found the paths from the compilers with the following commands:

for the CMAKE_C_COMPILER xcrun -find cc

for the CMAKE_CXX_COMPILER xcrun -find c++

scheffle commented 3 years ago

I think you need to use a newer cmake version on macOS 11 and Xcode 12.

ygrabit commented 3 years ago

did you try a newer cmake version?

ludiccc commented 3 years ago

Actualy, I'm using the last cmake version, the one used with the Xcode. The problem is not the cmake version, 'cause I handled to compile the app the way I explained above, but the failure finding the propper compilers.

The problem doesn't seem to be solved yet.

scheffle commented 3 years ago

You have to make sure that CMake can find your compiler. Normally that works out of the box if you have Xcode installed. Why this doesn't work on your side, I don't know.

ludiccc commented 3 years ago

That's the problem: CMake can find the compiler. It doesn't when being called by the VST3_Project_Generator.

scheffle commented 3 years ago

For me this works out of the box. How did you install Xcode and CMake? Are they in their default location in /Applications/ ?

ludiccc commented 3 years ago

Yes, they are on the default locations.