Are there any plan for supporting CLion?


Can you test it? It should work since it’s CMake :slight_smile:


I initially tried just running the programGenerator, but it gave me a ‘cmake not supported for 6’ error - hence my question.

I just tried commenting that check out, but looking into it now I see that the generated CMakeLists.txt file is OS X specific (compiler flags, link). Let’s see if I can tweak that to work on Linux, too. :sweat_smile:


ilmenite, for loading addons to the project using the addons.cmake the only thing needed was to include the lines for the addons? I’ve tried more than one addon, even the ones provided with the templated, without success. Do you have any idea what I’m doing wrong?


Here my template for a OF project in CLion on Linux : github


Thanks for your reply PPilmeyer, but I’ve figured out what to do. I like to use ofxDatGui instead of ofxGui and this addon splits the code over multiple foldes. I hade to create a header and file variable for each folder, but it’s working now. I don’t see myself using XCode again anytime soon.


I’ve adapted @PPilmeyer’s (excellent) CMake files to automatically pull in any addons from addons.make & generate the necessary includes on-the-fly - not sure it works correctly for all addons, but so far, so good.
(There are some other small tweaks, too)

I can try integrating that into @ilmenite’s fork of the program-generator, but the structure of @PPilmeyers files is a bit different from the OSX CMake. I can adapt those, but I can’t really test them properly.



Dear all!
I worked on a new approach for CMake. Focus on simple usage and easy integration. It is tested with CLion and works fine!

I started a new discussion thread for this version:
CLion and CMake support

Hope you like it


I spent a week away from this post and when I came back to say I finally got 0.9.4 to work, I find out someone came with an awesome and way more complete solution than the one I had:

Great Work @BildPeter


Hi !
I am trying to use
with CLion 1.2.1 on Linux 64 (Ubuntu) and OF 0.9.8
but the build fails at linking stage with

[ 95%] Linking CXX shared library /home/mgr/Bakery/OF-Template-for-CLION/bin/

/usr/bin/ld: cannot find -lmpg123

any clue on this one ?
seems like a include_dir missing but i am not very familiar with cmake…
OF already works properly with the classic make way.

Thanks !

EDIT: sorry, i was just missing libmpg123-dev
sudo apt install libmpg123-dev
fixed the issue


Still trying to use

Any clue on how i should include addon ?
I guess i should edit cmake/addons.cmake
but i don’t know what to put there to use i.e. ofxMidi or whatever addon in of/addons/

Thanks !


mgr37, I prefer to use DatGui addon instead of the standard ofGUI. The way I included it was writing these lines in addons.cmake

file(GLOB OFX_DAT_GUI "${OF_DIRECTORY}/addons/ofxDatGui/src/*.cpp")
set(HEADER_OFX_DAT_GUI "${OF_DIRECTORY}/addons/ofxDatGui/src/")


Check which headers and source code you need from the addon and include them like I did with DatGui. It will probably work.


hi I read over this thread and conglomerated all of the work done by everyone here into my own project. just clone and go

let me know if there are problems