Compilation Database for Juce Library?

Hello,

Ive been using both the Juce CMake examples and Projucer on Linux to make some initial basic projects. When using Projucer I select the “LinuxMakeFile” option and it works fine.

However, when it comes to code autocompletion I notice that the absence of a CMakeLists.txt when using the Projucer method is quite a drawback (I only get a makefile) when it comes to generating a compilation database that I could use. Generating this databse with the CMakeLists.txt involves only adding a single line and it creates one, which my autocomplete plugin (“YCM”) can then read,

I like the ease of use of the Projucer so would like to work out the best way to generate a similar compilation database from what is generated by the Projucer.

Does anyone here use a similar method to me or know how to approach it?

I think a CMake specific option in the Projucer would be realy good

You could try out https://github.com/rizsotto/Bear to generate a compilation database from a makefile.

Thats perfect. Thanks!