teragonaudio / CMakeJuce

CMake helper files for Juce projects
MIT License
23 stars 6 forks source link

CLion import JUCE modules? #6

Open ebenoist opened 7 years ago

ebenoist commented 7 years ago

First, thank you for putting this together. Working in CLion makes me feel far more sane than XCode. I have one issue that I'm wondering if you've seen before. While my build works great from inside CLion, the IDE doesn't seem to detect the JUCE library at all, which means in the IDE everything appears broken.

screen shot 2016-08-21 at 9 39 42 pm

Do I need to do something in CLion or the CMakeLists to allow it to resolve that import?

ebenoist commented 7 years ago

So I messed around a bit with the juce.cmake file and got it working.

Adding a direct include_directories line to point to the SDK works

include_directories(/Users/ebenoist/dev/JUCE/modules)

Also turning on the local copy option in Projucer and vendoring the JUCE code works, but still requires an addition:

include_directories(${juce_SOURCE_DIR}/modules)

Not sure what the correct way to solve this would be though.