Too Hard to Create a Cmake Project?

Hello. I wonder if it is too hard to create a JUCE Audio Plugin for Cmake, since I wanted to work with CLion. Anyone has good/bad experience with that? And would it be too hard to convert a VS2013 project?

 

Thanks

We've not looked at CLion yet, but it sounds interesting and we'll check it out soon! If enough people start using it, we may want to add direct support for CLion projects in the introjucer.

That sounds nice, Jules. Meanwhile, is there any shortcut to port VS projects to Cmake?

I've no idea - could be that the CMake devs have a utility for that.

Guess I better wait for an eventual CLion support and stick to VS for awhile. Thanks.

CLion currently uses CMake as its project model, so supporting CMake would mean also supporting CLion.

However, we probably won't invest the effort required for adding CMake project generation to Introjucer just yet. The Introjucer itself is already a solution for generating cross-platform project files. CMake is another one. Imagine that you would use Introjucer to generate CMakeLists - then you would in turn use CMake to generate Xcode/Visual Studio/etc. projects from that... Does not seem like a very good workflow.

CLion itself seems to be a nice IDE. So in order to add support for that, maybe it would be better to see if CLion could eventually support other project file formats besides CMake.

Well it's rather the other way around... CMake allows you to generate Visual Studio projects (as well as Xcode projects, Makefiles...) from platform-independent CMakeLists.

So I'd say it's unlikely that there will be such a utility.

Some conversion tools:

http://stackoverflow.com/questions/6649606/vcxproj-to-cmake

 

+1 for CLion project (CMake) generation from the Introjucer.

Go on.  Do it.  CMake for CLion.  Xcode is driving me nuts :) 

 

Though, this: http://sourceforge.net/projects/vcproj2cmake/ maybe?  I might have a go...

1 Like

If you search on github for "juce cmake" you'll get several hits.

This looks like the easiest to use : https://github.com/teragonaudio/CMakeJuce

 

I haven't tried it out yet. The author is active on this board though.

Now, i have tried it out. I could compile the JuceDemo in Clion on Ubuntu after cloning the CMakeJuce project into

the Builds folder and creating 2 files as per instructions on the page. Works great!

 

Creating the CMakeLists files could be automated with a script easily, its just a little boilerplate.

 

+1 again -  really interested to try out CLion... 

Okay - so I've done it.  That github project worked just fine.  Thank you to whoever did that. 

CLion - 

  • Editor, refactoring ... amazing. omg.  etc. 
  • Distraction free mode - awesome.
  • Debugger integration kinda working but a bit slow unless i remove my gdbinit file (the console output is mega laggy and makes stepping through painful if the gdbinit file displays much text). 
  • Compiling seems sound... 

Going to stick with it for some projects for my 30 day evaluation and see how it goes. 

Well - the real pain is that if you dont' specify copy source files then it doesn't make all the auto-lookup stuff work...

cMake would also mean allowing to export for qt Creator, which is not a bad IDE at all!

I quite like its simplicity, I've only used it for one project but I enjoyed the experience, particularly that it looks the same on all platforms - let alone that it EXISTS for all platforms :)

I automated it and submitted a pull request back - but there are real problems with finding symbols if the juce source files aren't copied across to the project, and a few related bugs with includes inside namespaces in CLion.  I hope for good things, but the wrinkles need ironng out :)

How do I make a open a JUCE project in CLion? I downloaded this Python script that automates creating the things necessary from Teragon Audio's CMakeJUCE. I'm not really sure what to do after that though. Has anyone succesfuly opened a working project in CLion? 

By the way, here's the Python script that downloads and creates the CMakeJuce files when run from within project created by the Introjucer.

https://gist.github.com/alexgustafson/4df824c0654056e18b9e

It seems like a really great IDE and I'd love to use it on other platforms like Linux (I'm a Windows guy). I just need to figure out how I can generate projects created from the IntroJucer that will workwith CLion and how to use them. I'm a student so I was able to get CLion for free, so I'd like to use it.

You could try https://github.com/seebk/JUCE

It is a fork of JUCE which has an exporter module for QtCreator projects.

As already posted earlier, CLion seems like a great IDE, but unfortunately at the moment it is not on our immediate roadmap to add a CMake exporter directly into the Introjucer.

You definitely need to rethink your roadmap.

cmake_minimum_required(VERSION 3.3) 
project(myproject) 
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 
add_custom_target(helloWorld COMMAND cd /path/to/project/Builds/LinuxMakefile && make)

^ Cheating... YMMV. I'm sure there's a better way but my CMake foo is... well... nonexistant.