Topic: CMake build system

First, I just want to say hello and thank you for Maratis.

To be honest my first reaction when I saw Maratis was "OMG! It's so tiny and cute!", as if I just had seen an image of the cutest cat on the internet, after I came by it by chance via the TIGSource forum.

It's refreshening to find a complete multiplatform game development solution -- being multiplatform in the sense that also the development tools run on multiple platforms (especially Linux). Also nice to see an open source game engine free from bloat and legacy cruft.

I hope to contribute something back to the project in the near future. So far I've ported the build system to CMake to make it easier to generate Makefiles for the build on Linux and a Code::Blocks project to let me dive into the source, as well as Xcode and Visual Studio projects. Altough, I haven't tested to build it on a Mac or Windows machine yet. It is still a work-in-progress.

I'll be pushing my contributions to a git repository on GitHub:

  https://github.com/dahnielson/Maratis

The master branch will just be me tracking the SVN revisions while I hopefully will be pushing some contributions to the development branch in the future for you all to try out.

Last edited by Dahnielson (2014-02-08 12:37:42)

Re: CMake build system

Hi, thank you for the feedback !
are you very familiar with CMake ? What is your opinion about it, compared to Scons and premake ?

There is some thoughts about moving from Scons, but it's hard to see which system is better, active or fully multi platform (ideal would be a unified windows/mac/iOS/Android and linux x86 + linux ARM building system).

Re: CMake build system

Hey Dahnielson!

Finally! CMake is so much better than Scons! Thank you!

Sponk

PS: Dahnielson: Is it possible that I saw you before on the Garagegames forums?

Re: CMake build system

I've been using CMake for more than a couple of years now. Guess you can call me an intermediate user. CMake is quite easy once you've gone through the man page [1] and got your head around most of the variables and a useful subset of the commands. The power of CMake is the simple syntax combined with its know-how of each platforms quirks and the plentiful generators [2]. Making it most of the time easy to set up and maintain a build system while giving users a lot of options for how to do the actual build (ranging from IDE project to regular Makefiles).

Yes, it should be possible to generate build files or both Android [3] and iOS [4] in addition to all the desktop system. So CMake would be suitable for a completely unified build system.

To be honest I have not that much experience of Scons and premake as a developer. I have only used them as a end-user building others projects.

[1] http://www.cmake.org/cmake/help/v2.8.12/cmake.html
[2] http://www.cmake.org/cmake/help/v2.8.12 … Generators
[3] http://code.google.com/p/android-cmake/
[4] http://code.google.com/p/ios-cmake/

Last edited by Dahnielson (2014-02-03 20:06:19)

Re: CMake build system

Sponk wrote:

PS: Dahnielson: Is it possible that I saw you before on the Garagegames forums?

Yep, I'm an old owner of TGE and came back briefly when Torque went open source, but got a bit frustrated with the lack of Linux support.

Re: CMake build system

Hi Dahnielson. Welcome. Good to see more users come.

Re: CMake build system

Thank you,
it's worth considering an official move to CMake in the near future,
let's see how the experimental branch is moving, I didn't find time to update Maratis editor with the new MGui.

Re: CMake build system

Dahnielson: Nice to see someone from over there wink

BTW: Your CMake build system creates a 32bit build environment even on a 64bit machine. I think some sort of switch would be nice to choose whether to build 32bit or 64bit wink

Sponk

Re: CMake build system

Sponk wrote:

Dahnielson: Nice to see someone from over there wink

BTW: Your CMake build system creates a 32bit build environment even on a 64bit machine. I think some sort of switch would be nice to choose whether to build 32bit or 64bit wink

Yes, I made it 32bit by default just to be portable (since the Maratis SDK offered on the homepage is 32bit). But I'll add an option to select between 32bit and 64bit build.

Re: CMake build system

Dahnielson wrote:
Sponk wrote:

Dahnielson: Nice to see someone from over there wink

BTW: Your CMake build system creates a 32bit build environment even on a 64bit machine. I think some sort of switch would be nice to choose whether to build 32bit or 64bit wink

Yes, I made it 32bit by default just to be portable (since the Maratis SDK offered on the homepage is 32bit). But I'll add an option to select between 32bit and 64bit build.

I just added an option for forcing 32bit build on Linux and pushed it to GitHub. Btw, I set it to ON because I think that's a sensible thing to do for portability.

Last edited by Dahnielson (2014-02-05 13:55:02)

Re: CMake build system

Welcome Dahnielson !
Awesome work you did on the wiki, it looks much better now, thank you wink

Re: CMake build system

Hello greetings to all please somebody can send me all that I need to compile in Maratis3d android, ios etc.... from here I don't have access to this http://code.google.com/     paginates y not you because wax that   
 
 
 
This has me frustrated since for while in that it paginates many useful things they come 
Greetings to all from Cuba and I congratulate them for this brilliant Maratis3d. I sit down it for my bad English

Last edited by jchp7787 (2014-02-11 01:52:13)

Re: CMake build system

jchp7787 wrote:

Hello greetings to all please somebody can send me all that I need to compile in Maratis3d android, ios etc.... from here I don't have access to this http://code.google.com/     paginates y not you because wax that   
 
my mail is: jchp7787@gmail.com 
 
This has me frustrated since for while in that it paginates many useful things they come 
Greetings to all from Cuba and I congratulate them for this brilliant Maratis3d. I sit down it for my bad English

Try using my (or Nisturs) git repositories instead. GitHub doesn't block Cuban users afaik. Both repositories contain forks of the Google Code subversion repository with a few minor tweaks. You can use the "Download ZIP" button on GitHub if you don't want to check out the repository.

There's no Android build of Maratis yet, altough I'm interested in getting one. The iOS build is currently only available from Google Code, but I'm working on integrating it into the CMake-based buildsystem I've set up in my git repository (will probably push it to GitHub during the day).

Last edited by Dahnielson (2014-02-06 08:07:24)

Re: CMake build system

thank you friend right now will prove all that, it excuses the nuisances but I want many to have the maratis 3d greetings bye

Re: CMake build system

I have now pushed an integrated but untested iOS build as an experimental branch called "ios" to github:

   https://github.com/dahnielson/Maratis/tree/ios

There's a new option "Generate iOS build (requires Xcode)" available when configuring the build on Mac OS X that need to be turned on. CMake then require that the Xcode generator is used or it will protest with a fatal error and quit:

  cmake -DMARATIS_BUILD_IOS=ON /path/to/source

I'm not entirely shure it's possible to set the toolchain file from within the CMakeLists.txt as I've done instead of from the cli, hopefully it will "just work". wink

Since I don't have access to any Mac I haven't been able to test if it generates a working project. So please go ahead, check it out, run the iOS build and report back any problems.

Last edited by Dahnielson (2014-02-06 14:52:29)

Re: CMake build system

I will test your iOS build tonight.

Awesome job on the wiki Dahnielson !
So much clearer and organized ! cool

Re: CMake build system

For iOS I got this error :

CMake Error at CMakeLists.txt:42 (IF):
  if given arguments:

    "CMAKE_GENERATOR" "NOT" "Xcode"

  Unknown arguments specified

Separately, the non-ios mac Xcode generation goes further but stopped :

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FREETYPE_LIBRARY
    linked by target "MaratisEditor" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Editor
    linked by target "MaratisPlayer" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Player
ZLIB_LIBRARY
    linked by target "MaratisEditor" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Editor
    linked by target "MaratisPlayer" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Player

Re: CMake build system

anael wrote:

I will test your iOS build tonight.

Awesome job on the wiki Dahnielson !
So much clearer and organized ! cool

Thanks! I thought the Main page of the wiki was a little bit empty. When I started looking into Maratis last Saturday I was momentarily a bit confused when I forgot that it existed and thought the User manual was the Main page.

I'm thinking of writing a bot that can update the C++ API class pages in the wiki using the XML output from Doxygen.

Last edited by Dahnielson (2014-02-06 18:15:50)

Re: CMake build system

anael wrote:

Separately, the non-ios mac Xcode generation goes further but stopped :

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FREETYPE_LIBRARY
    linked by target "MaratisEditor" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Editor
    linked by target "MaratisPlayer" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Player
ZLIB_LIBRARY
    linked by target "MaratisEditor" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Editor
    linked by target "MaratisPlayer" in directory /Users/anaelseghezzi/Downloads/Maratis-ios/M/Maratis/Player

Stupid mistake of me, will fix it. Think I was a bit tired when I tried to dechiper the project.pbxproj file.

Last edited by Dahnielson (2014-02-06 18:00:31)

Re: CMake build system

Dahnielson wrote:

Stupid mistake of me, will fix it. Think I was a bit tired when I tried to dechiper the project.pbxproj file.

Think I've pushed a fix to github. Hopefully. smile

Try again.

Last edited by Dahnielson (2014-02-06 18:04:25)

Re: CMake build system

Thank you, I'll try again.

ps : your signature made me smile, I myself followed a very similar path :
Amstrad CPC BASIC, C/Allegro/DJGPP and C++
(it was just interlaced with learning drawing and 3d modeling/animation)

The first version of the engine that evolved into Maratis was using Allegro and it's software rendering smile
I looved Allegro...

22

Re: CMake build system

I used Allegro too ehehe nice piece of software.
But Game Maker is what I used more for 2D, despite all its disadvantages.

Re: CMake build system

Dahnielson wrote:
Dahnielson wrote:

Stupid mistake of me, will fix it. Think I was a bit tired when I tried to dechiper the project.pbxproj file.

Think I've pushed a fix to github. Hopefully. smile

Try again.

Did my fix take you any further?

On another topic: I'm thinking of trying to support CMakes companion CPack in the build system to generate RPM, deb and gzip distributions of both binaries and source code for Linux, NSIS files for Microsoft Windows and Mac OS X packages.

Re: CMake build system

The Xcode for mac is generated.
But there is some error when compiling :

STEPFile.h "STEPFile.h:198:64: Use 'template' keyword to treat 'To' as a dependent template name"

I don't have errors with Assimp when building with Scons, but maybe we don't use the same version, did you update the Assimp lib ?

Maybe missing the flags "ASSIMP_BUILD_BOOST_WORKAROUND ASSIMP_BUILD_NO_OWN_ZLIB" ?

Additionally (but not related to the previous error), I didn't see the flag :
"M_PACKAGE_WRITABLE" for maratisEditor (not needed for the player)

I'm also not sure the runpath search path is defined (depending on the dylib installation path) but should be "@rpath"
or "@executable_path/../Frameworks @loader_path/../Frameworks"


With the ios option it stops before generating the xcode project :

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
OPENGL_LIBRARY
    linked by target "MaratisApp" in directory /Users/anaelseghezzi/Desktop/Maratis-ios/M/Additional/iOS

Re: CMake build system

I just went to the wiki just now, you changed that Dahnielson? If so, it looks nice!

I think all the pages need a bit of reformatting. I haven't added anything in a while, trying to get stuff to work first.

Good to have you here also.