Anyone interested in my CMake script?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 03/03/2012 at 08:23, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   R10+ 
    Platform:   Windows  ;   Mac OSX  ; 
    Language(s) :     C++  ;

    ---------
    After some days of (mostly OSX and XCode related) compiling frustration I decided to write a CMake script to ease the process which I am considering to release on github or so.

    The script generates C4D API targets and plugin targets (it does not rely on C4Ds XCode/VS api projects).
    It currently supports C4D Versions from R10 onwards (R10.5 on OSX; it should be trivial to add support for older versions), generation of Visual Studio projects and Unix Makefiles. It doesn't (propery) generate XCode projects, but could be extended to do that as well.

    The compiler settings for the API projects are modelled after the windows/osx API projects and are(should hopefully be) 100% conform.

    It's especially useful if you are using an automated build system like buildbot (or you if prefer two simple shell commands to endless XCode frustration).

    So yeah, anyone interested?

    Edit: sorry, posted in the wrong forum. Can a mod please move it to General Discussion?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2012 at 08:21, xxxxxxxx wrote:

    It's a simple enough process to use the cinema4dsdk projects or your own existing ones as templates for new plugin projects in VS and Xcode.  This is how I've been doing it for the past eight or more years and typically results in flawless builds.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2012 at 12:18, xxxxxxxx wrote:

    Sure, that is easy enough, but it simplifies the process of adding/removing source files to/from all the projects (quite a few, depending how many versions are being targeted), or changing compiler options in all projects. Sure, in VS, you can just make 1 project with several configurations (for each targeted version), use property sheets, etc, but in XCode I don't know of a way to do that quite as conveniently (well, property sheets it does have).



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2012 at 13:38, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    Sure, that is easy enough, but it simplifies the process of adding/removing source files to/from all the projects (quite a few, depending how many versions are being targeted), or changing compiler options in all projects. Sure, in VS, you can just make 1 project with several configurations (for each targeted version), use property sheets, etc, but in XCode I don't know of a way to do that quite as conveniently (well, property sheets it does have).

    There 's no reason to fiddle with CMake. Adding/removing source files is D&D; in Xcode. Changing compiler options or compilers can easily be done by editing the _apibase_debug.xcconfig or _apibase_release.xcconfig files.

    The cinema4dsdk project is based on these xcconfig files. If you use multiple projects based on these xcconfig files inside of an umbrella project, you can still change individual settings of a project by modifiying its target settings.

    Best regards,

    Wilfried Behne



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2012 at 14:14, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    There 's no reason to fiddle with CMake. Adding/removing source files is D&D; in Xcode. Changing compiler options or compilers can easily be done by editing the _apibase_debug.xcconfig or _apibase_release.xcconfig files.

    The cinema4dsdk project is based on these xcconfig files. If you use multiple projects based on these xcconfig files inside of an umbrella project, you can still change individual settings of a project by modifiying its target settings.

    Best regards,

    Wilfried Behne

    Hi Wilfried,

    first of all, I am not 'fiddling' with CMake. And yes, there are many good reasons:

    * works well with automated build systems. a commit doesn't break the build because a file was not added to any of the projects
    * projects can never get out of sync because someone forgot to update some config/project
    * compiling boils down to 'cmake . && make -j 8'. that builds all targets.

    To only name a few.

    Yes, I am aware that adding files is just D&D;, but that is exactly the point of the CMake script: to get rid of these manual steps that needed to be done every time a file is added, or removed (automated build systems).

    I am also aware of the xcconfig files.

    I was only offering this because I thought it could be useful to anyone else who prefers makefiles over XCode, simple console commands over dragging & dropping into 5 different projects.

    If you don't need it or don't want it thats OK.
    Whatever floats your boat :)

    Regards,
    Yves



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2012 at 14:46, xxxxxxxx wrote:

    Hi fused,

    I am interested in you CMake. Could you please share it with me? I'm on Windows and I refuse to use the Visual Studio IDE! I hope your CMake file can give me a better overview over the c4dsdk and how it needs to be compiled. :)

    Thank you!
    -Niklas



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/03/2012 at 16:00, xxxxxxxx wrote:

    Originally posted by xxxxxxxx

    I refuse to use the Visual Studio IDE!s

    the spanish inquisition is already on its way !



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/04/2012 at 10:53, xxxxxxxx wrote:

    @littledevil: Now, is that positive or negative for me? ^^
    @fused: I'm still interested in your script, could you please share it?



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 21/04/2012 at 11:34, xxxxxxxx wrote:

    Hi guys,

    sorry for the long delay, very busy at the moment.

    Will put it on github or google code when I have a free minute.

    Cheers!



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 28/06/2012 at 10:00, xxxxxxxx wrote:

    Hei fused,

    Could you please upload the script?

    Thanks,
    Niklas



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 29/06/2012 at 02:14, xxxxxxxx wrote:

    Sorry for the long delay. Here's the initial release.
    Will get a git repo or so sorted for it soon.

    http://www.indigorenderer.com/dist/exporters/cindigo/c4d_plugin_cmake_1.0.zip

    Any questions, just ask :)

    edit: fixed link



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 16/10/2012 at 09:04, xxxxxxxx wrote:

    A little update.

    1.1
    * Updated linker options for correct stripping on OS X (see https://plugincafe.maxon.net/topic/6572/7115_symbol-stripping-on-os-x).

    http://www.indigorenderer.com/dist/exporters/cindigo/c4d_plugin_cmake_1.1.zip



  • On 16/03/2013 at 07:11, xxxxxxxx wrote:

    Thanks,
    using CMake to build plugins for C4d is a option that I wanted to test...

    Originally posted by xxxxxxxx

    Hi fused,

    I am interested in you CMake. Could you please share it with me? I'm on Windows and I refuse to use the Visual Studio IDE! I hope your CMake file can give me a better overview over the c4dsdk and how it needs to be compiled. :)

    Thank you!
    -Niklas

    Can I ask why do you refuse to use VS IDE ?
    Will you also do not use Xcode IDE too ?



  • On 16/03/2013 at 07:29, xxxxxxxx wrote:

    Can't tell you why someone would not want to use an IDE but if you need any help getting my CMake script working, let me know :)



  • On 16/03/2013 at 07:33, xxxxxxxx wrote:

    Hi Remotion,

    Originally posted by xxxxxxxx

    Can I ask why do you refuse to use VS IDE ?

    I am unable to work with the Editor of Visual Studio. I'm used to the behavior of the Notepad++
    Editor. Back then, I didn't understand much about C++ and Compilers and I didn't understand
    to set up a Project for a new Cinema Plugin. Although I know how to do this now, I'm still
    compiling from the command-line. Setting up an environment to start right off coding a plugin
    works much faster (at least for me) this way.

    There's a repository of the command-line scripts I use for achieving this (relieng on Makefiles) on
    github. All I do to start a project is to copy the template folder from the repo into the Cinema
    plugins folder, rename it and open the command-line.

    > vcvarsall
    \> make description DESCNAME=Oplugin
    \> make plugin DEBUG=1
    

    Originally posted by xxxxxxxx

    Will you also do not use Xcode IDE too ?

    I'm pretty sure I will also not use XCode. I have tried to keep the Makefiles on the rep above
    as abstract as possible. As soon as I have a mac, I will try implement the api\platform\mac.mak file
    to compile plugins on the mac. This will (hopefully) allow me to simply copy my plugin structure
    to the Mac, run the Makefile and I'll be done without creating an XCode project.

    Best,
    -Niklas



  • On 16/03/2013 at 07:42, xxxxxxxx wrote:

    Thanks I was able to compile this example for R12,R13,R14 now I need to try to do this for one of my bigger projects.
    May be later for very big one like SuperVoxels :)

    Well using comand line or script or CMake for compiling has some advantages.
    I am using Notepad++ but mostly to read the code.
    Using Notepad++ for coding has a lot of disadvantaged in my opinion, no auto completion, no refactoring and more...



  • On 16/03/2013 at 07:48, xxxxxxxx wrote:

    @Remotion: That's correct, features like intelli-sense in VS or refactoring are not included in
    Notepad++. But hitting these problems helps me writing better code right from the start so I
    actually wouldn't need these features. 🙂

    Good old search-and-replace is my best friend, btw.



  • On 16/03/2013 at 07:59, xxxxxxxx wrote:

    Nobody can write code that do not need refactoring in (near) future :)



  • On 16/03/2013 at 08:28, xxxxxxxx wrote:

    you should take a look at sublime text 2. it is better than visual studio python in almost 
    all aspects. the only reasons i have still visual studio python installed, are the watch
    feature and stepped interpreation of my code. the refactoring and autocomplete of 
    sublime text 2 is with plugins are better than the one provided by visual studio python.

    not sure how the situation is for cpp, but multicursor editors are such much powerful
    than single cursor editors, because things like refactoring suddenly become obsolete,
    because it is now just typing a new name. and there are freakishly powerfull python 
    addons for sulime text2/3. like sublimecodeintel or sublimerepl.



  • On 16/03/2013 at 08:55, xxxxxxxx wrote:

    Well for Python there are probably a lot of options but I am talking about C++.
    MultiCursor Editing is possible in VS with an extension too.
    How can be refactoring become obsolete if you need to change 10 or even 100 of files at once ?
    And of course you only want to change this one member function name that may have the same name as a other member function in another class ....


Log in to reply