Development > Coding

Using cmake to setup build env

<< < (2/11) > >>

hwoarangmy:
Yes, I had this error when using the headers/libraries from the codeblocks+mingw package.
The error comes from this commit:
https://github.com/hwoarangmy/ufoai/commit/bf841a7ff5325e10775cae7a67eaf7ebea67a30f#diff-3062a8827676e9b846c0ac56236a4744L340

because g_mutex_init and the mutex related functions are not found. For my tests, I've rolled back this commit and it worked.
If I am not mistaken, those functions are from glib. I guess your Linux distros have more recent glib. The best would probably be to update the bundled glib. I will try with a new version and tell you if it works.

Concerning cmake, I was able to build all the projects (including radian). There were too many dependencies so I didn't want to mess with gtk and all their dependencies. That's why I used the package libraries. For cmake finding module, I will assume there is 1 include directory per needed library (in the bundle, the include directory will be the same for all dependencies).
Now, the last missing thing is the icon ^^

Then, I will try on linux

hwoarangmy:
I've tried with a newer version of glib (the one bundled with the latest gtk version) and, as expected, it fixes the compilation problem with mutex functions.

Concerning cmake,  could make it work and found a way to use icons with only a small modification of the rc files. ATM, they use a flag to know if they should use a relative path. I've removed the flag and replaced it with the path to use. That makes the rc file more straight forward.

Concerning the bundle, I can make a new one to fix the issue by replacing glib headers + libs. Do you want me to do that ?

Concerning cmake, I'm testing on linux.

DarkRain:

--- Quote from: hwoarangmy on August 11, 2015, 10:55:32 pm ---Concerning the bundle, I can make a new one to fix the issue by replacing glib headers + libs. Do you want me to do that ?

--- End quote ---
That would be nice for our windows users.


--- Quote ---Concerning cmake, I'm testing on linux.

--- End quote ---
Great!

hwoarangmy:
I'm done with the first version. I've tested on Linux and it builds successfully on my Ubuntu as well as on windows.
I've rebased tonight and made the required changes due to lua.

Note that I've tried to follow what was done on the makefiles while working on cmake. But I couldn't test on Solaris or MacOSX.

If you want to integrate it, I can make a pull request on guthub.

The next steps, if you want, could be to turn building projects optional (with only game + ufo checked by default).
It might also be a good idea to allow to enter a dependency path so that users can compile without having to mess with the dependencies (that would be very close to the codeblocks current zip but with the dependencies only).

To test, you can have a look:
https://github.com/hwoarangmy/ufoai

WDYT ?

DarkRain:
This is great!

Will a better look later, but just from what I can see: There seems to be no support for SDL2? I'm sure that's the direction Mattn wanted to move on. Is that something that can be made optional choosing between SDL 1.x and SDL 2.x? (Or maybe its already in and I'm just not seeing it...)

Also yes, having the option to turn projects on and off would be nice, as for dependecies, I gues that would be most useful for windows user I'd think?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version