We have recently set up an OSX project with Clion/Cmake and are loving the promise of easier cross platform dev! At the bottom of the Cinder CMake guide it says that at the time of writing Windows was not currently supported - is this still the case?
I understand we may need to resort back to Visual Studio for the Windows port of this project but was wondering if any recommendations around the best way to attempt a windows build?
I am yet to install Clion as was not sure what to do when prompted to choose between a MinGW or Cygwin environment although have no preference.
Really the only reason Windows isn’t considered a supported platform for cmake builds is that we haven’t finished it, but there are many avenues there that seem promising. I took an initial stab for CLion / mingw and ran into a bunch of shortcomings with the compiler toolchain there (it is old and incomplete). I believe that CLion folks are planning to support the MSVC toolchain sometime this year. Hai afterwards put some work into generating proper Visual Studio project files, and I think that was working (if not, very close). More recently, Visual Studio 2017 (released yesterday) supports building cmake files directly, so that also seems like something worth trying.
To give some history on how we arrived here: our CMake support began out of necessity for building libcinder on Android, and then linux. At that point, partly due to OS X’s Xcode performing progressively worse with large C++ projects, we unified the system so that CMake could be an option on any platforms. We invested quite a lot of energy into that, including blocks support and CI integration and continue to do so, however cmake on windows could use a community champion.
We’ve agreed that for the time being, the hand-tuned Xcode and Visual Studio project files will remain, until such a point that there is no longer any benefit to maintaining them. At current, the hand-tuned project files are much more sane and easy to operate than those generated by cmake, but there’s nothing stopping users from using cmake generated projects, and hopefully we’ll see some improvements there as more people are adapting to the cmake builds and begin contributing. The best part about cmake is that it is used industry wide, so there really isn’t anything that we’d want to do that some other project hasn’t figured out, the methods just need to be sought out and implemented.
Hope that helps clarify the current situation! Bit by bit, cinder is becoming a full-fledged cross platform library.
Thanks for clarifying Rich,
It looks like MSVC is already in the early access build of Clion according to this. Hopefully will be in the main release soon.
My excitement for Cmake is because I often deploy on windows despite preferring to dev on OSX (or linux) and I am a big fan of IntelliJ IDEs. I currently use Appcode instead Xcode although would be happy to switch to Clion if it took care of cross platform deployment. If needing to use Visual studio as an IDE however, I don’t mind starting with tinderbox and manually updating project files although will definitely suss out the CMake generated projects. Are we currently able to generate Xcode projects too?
If MingW doesn’t look like a viable option, do you think that waiting for MSVC is likely the better choice rather than exploring Cygwin (for Clion)?
I’m dusting off some old code and would be up for giving this a go, anything I should know before I start?