Are there any plan for supporting CLion?


#42

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


#43

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:


#44

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?


#45

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


#46

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.


#47

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.

Thoughts?


#48

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


#49

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: https://github.com/jrmoretti/of-CLion-2016.

Great Work @BildPeter


#50

Hi !
I am trying to use https://github.com/PPilmeyer/OF-Template-for-CLION.git
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/Template.app/Contents/Frameworks/libopenFrameworks.so

/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 !
Best,

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


#51

Hi!
Still trying to use https://github.com/PPilmeyer/OF-Template-for-CLION.git

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 !


#52

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/")

set(ADDON_SOURCE_FILES  ${OFX_DAT_GUI}}
set(OF_ADDON_HEADERS ${HEADER_OFX_DAT_GUI}}

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


#53

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