Development > Coding

Using cmake to setup build env

(1/11) > >>


First, thanks again for this great game. I've played 2.5 a year ago (finished it in normal) and I've recently started a new campaign to try 2.6 in hard mode and it seems you have done some great work. I will give you some more feedback when I will have played a little bit more.

I've recently downloaded the code source from github and compiled it (at least game, ifo2map, ufoed and ufo). Have you ever considered using cmake ?
Would you be interested in using it ?
If yes, I'm not a cmake expert but I can give a try ^^


Glad you are enjoying the game, and sure if you could get cmake working that would be very nice :)

I've done a little research regarding cmake at some point, it's likely a lot of work. Stackoverflow has some valuable info.
cmake would allow generating an MSVC project file, as it seems the ability to compile with MSVC was present some time way in the past and then got lost due to nobody maintaining it. That is bad, since it should have a positive effect on code stability if you're able to compile and/or debug using various tools, and developer interest can rise.

Well, actually, it was easier than I expected. I choose to not use a bundle for dependencies to try the latest versions I can find. Note that I use code blocks with MinGW64.
ATM, I can build every project excepted uforadiant because it needs gtk. I've downloaded gtk dev libraries but it seems an older version is used in this project as I get errors complaining that only gtk/gtk.h should be included (from what I've seen, many files here include gtkwidget or only what they need - which seems not the way to do in the new version).
Because of that, I've downloaded ufoai codeblocks zip to get the includes and libraries used in the project (since I cannot use the latest version, the easier is to use this one).

For finding the dependencies, I've tried to use the scripts bundled with cmake as much as possible (because they probably include more search paths than the ones I will think of - especially on environments I don't know like MAC OS). Fortunately, I could find those for most of the required dependencies.

Once I get uforadiant to compile, I will have a look with linux (with Ubuntu running in virtualbox). I guess it will be easier as with windows, no dependency is found by itself.

--- Quote from: anonymissimus on August 08, 2015, 04:49:58 pm ---That is bad, since it should have a positive effect on code stability if you're able to compile and/or debug using various tools, and developer interest can rise.
--- End quote ---
Yes, finding people who want to join an open source project is hard enough to not have them have to change the environment they like.
The good point with cmake is that it sets up the environment you like (be it MSVC, codeblocks MinGW, ...) by itself. The problem with maintaining project files is that when there is no more coder using it (for example MSVC), it will die fast (when a new file is addedn for example). When using cmake, you had a new file in the makefile and it will change all configurations ^^ (even some you had never tried and even knew they exist)

Good to hear that you are making good progress, looking forward to it :)

To be fair uforadiant has always caused us problems... I'm not even sure if it actually compile on windows right now — see bug #5252 (I know it compiles on linux)


[0] Message Index

[#] Next page

Go to full version