Game Development Community

cMake system for Torque3D MIT version

by Dusan Jocic · in Torque 3D Beginner · 03/04/2013 (5:27 pm) · 4 replies

Few days ago I have read that some people would like cMake system in order to easier build T3D.
I have write complete new system for generating project based on their request.

Empty cMake
i218.photobucket.com/albums/cc300/Drago85/cmake2_zps4ef95732.jpg
All options inside cMake
i218.photobucket.com/albums/cc300/Drago85/cmake1_zpsf5fe8678.jpg

NOTE: Third screen might be small because its taken as screenshot from dual monitors

cMake Visual Studio solution

i218.photobucket.com/albums/cc300/Drago85/Untitled-5_zpsb4078dc5.png


Whole system is quiet easy as you can see inside screenshots (if they are small I can replace them with new one).
I have created this to be replacement for old generateProject and project configuration files what are coming with MIT version of T3D.
As you can see on provided pictures, system is automatically searching and adding Microsoft DirectX SDK and OpenAL SDK (I have worked with OpenAL11CoreSDK) so there cannot be any problems with configuring and generating "empty" solution. For other modules such as "Bullet", "Fmod", "LeapMotion", "PhysX" I have provided cMake files in order to try to find the libraries, if they aren't found, user must locate library and include files manually.
For now, only cMake module for "Razer Hydra" library files is missing, but it isn't really big problem to be added.

I will reorganize (by branches) my GitHub fork of T3D and commit there everything related for cMake.

Dusan Jocic

#1
03/04/2013 (8:06 pm)
Awesome! Thank you.
#2
03/05/2013 (3:27 pm)
Code is commited on GitHub

https://github.com/TheDushan/Torque3D/tree/cmake

So far, only problem what I had with compiling is that module definition file is not working correctly if there is white space in folder name.
Some modules aren't working, (I will fix that soon).
cMake is correctly finding nVidia PhysX SDK 2.8.4 (compiling with nVidia PhysX isn't working at this moment), Fmod library files, DirectX SDK and OpenAL (OpenAL11CoreSDK).

I have successfully build VisualStudio 11 solution and compiled whole source with FMOD module.

If there are some problems, I will try to correct them.

Dusan Jocic
#3
03/10/2013 (11:57 pm)
I got an error doing a debug build in VS2010 regarding /Ox and /RTC1 being incompatible. It appears it tries to mix optimization with debug builds.
#4
03/12/2013 (10:09 am)
@Peter C
Thanks for that. I have fixed that and pushed new commits with fixed compiling if USE_BULLETPHYSICS is selected.

Quick note: before with generateProject, entire Bullet library was located inside libBullet, I have broke that into separated modules (BulletCollision, BulletDynamics, BulletMultiThreaded, BulletSoftBody, LinearMath and MiniCL ) and linked that with main project file.
It isn't problem that we create same way as before, if needed. Reason why I did this is because I have my own private repo and I like dynamic link libraries. :-)

I have tested it with release and debug build and it is working ...
Now only two more projects are missing, mainly IP Plugin and NP Plugin. I will add cMake solution for that next time when I have more free time.

Dusan Jocic