CMakeLists.txt in Xcode

The VST3 SDK on the Mac adds CMakeLists.txt to every plugin example. I’ve noticed when I edit one of them in Xcode also the content of the project-map is changed (for example c++ files are added or removed).

I am wondering why these files are contained into the project-map (.xcodeproj) of the VST3 SDK ? I thought they were only necessary to create the .xcodeproj itself?

Is CMakeLists.txt necessary for building the project-targets or is it safe to exclude the files from the .xcodeproj ?

What is the correct way to add cpp files to the project-map? Do I have to edit also CMakeLists.txt ?

CMakeLists.txt are cross-platform. You just edit it and the next time when Xcode or Visual Studio is building your project it automatically updates the VS/Xcode project. You don’t edit the IDE projects anymore.

Thank you for your helpful answer Arne.

It was a bit tricky to make Visual Studio 16 build properly with CMakeLists.txt .
The caching seems to mess things sometimes up. I am sure that Microsoft will improve thing here soon.

XCode seems to be a bit better here, however it crashed when the read/write permissions were not set to ‘free for all’.

When using CMake you must always ZERO_CHECK before you compile. I wasn’t aware of this which confused me a lot.

I also experienced problems when several versions of the VST SDK are installed on a computer at the same time. This seems to mess up the cache of CMake.

Did you try to use cmake gui app ? it makes it easier. And you have not to forget to delete the cache (entry in the main Menu)

Hi Markus,
there should be no issue with multiple SDK installed. I always have a couple different versions installed on my machines. It looks like that you do something different than the rest of us. Or there’s an issue we are not aware of. What issue exactly do you face with it?