CMake fixes

CMake fixes

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
abompard
Posts: 19
Joined: 17 Jan 2009, 18:26

CMake fixes

Post by abompard »

Hi all,

I'm building RPMs for Spring on Fedora, and from the (distant) looks of it you're switching your build system from Scons to CMake. Is that right ? I quickly searched the forum but didn't find a definitive decision.

The build with Scons works fine, but I tried the build with CMake and I thought I'd let you know which problems I ran into :
  • CMake does not detect the Allegro library, because it misses the FindAllegro.cmake file, which I'm attaching here (it works for me but I'm no CMake developer, so it may need tweaking). Call to this file must be added to the CMakeLists.txt file, I'm attaching the patch too.
  • CMake does not install the AI libs in /usr/lib/spring like Scons does, but puts them in /usr/share/spring.
Apart from that, it looks pretty good to me :)

Did you reach a decision on your choice of buildsystems yet, or are you just testing CMake ?
Attachments
CMakeLists.txt-allegro.patch.txt
Patch to call FindAllegro.cmake
(724 Bytes) Downloaded 8 times
FindAllegro.cmake.txt
Let CMake detect the Allegro lib
(2.01 KiB) Downloaded 12 times
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: CMake fixes

Post by Auswaschbar »

abompard wrote:[*]CMake does not detect the Allegro library, because it misses the FindAllegro.cmake file, which I'm attaching here (it works for me but I'm no CMake developer, so it may need tweaking). Call to this file must be added to the CMakeLists.txt file, I'm attaching the patch too.
Spring does not need allegro library.
User avatar
det
Moderator
Posts: 737
Joined: 26 Nov 2005, 11:22

Re: CMake fixes

Post by det »

I see you have packaged spring-installer and ca-installer as well, Thanks! Was there any difficulty with these? I recently found out that they don't compile out-of-the-box on gentoo due to some lablgtk packaging incompatibilities.
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: CMake fixes

Post by Tobi »

Auswaschbar wrote:
abompard wrote:[*]CMake does not detect the Allegro library, because it misses the FindAllegro.cmake file, which I'm attaching here (it works for me but I'm no CMake developer, so it may need tweaking). Call to this file must be added to the CMakeLists.txt file, I'm attaching the patch too.
Spring does not need allegro library.
When some other thread was posted about this I noticed somewhere some distributions actually have libdevil depend on allegro, IIRC...
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: CMake fixes

Post by Auswaschbar »

Tobi wrote:
Auswaschbar wrote:
abompard wrote:[*]CMake does not detect the Allegro library, because it misses the FindAllegro.cmake file, which I'm attaching here (it works for me but I'm no CMake developer, so it may need tweaking). Call to this file must be added to the CMakeLists.txt file, I'm attaching the patch too.
Spring does not need allegro library.
When some other thread was posted about this I noticed somewhere some distributions actually have libdevil depend on allegro, IIRC...
Shouldn't they then link devil against allegro?
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: CMake fixes

Post by Tobi »

Yes, that's what I would think too :-)

Seems like it needs some further research..
abompard
Posts: 19
Joined: 17 Jan 2009, 18:26

Re: CMake fixes

Post by abompard »

det wrote:I see you have packaged spring-installer and ca-installer as well, Thanks! Was there any difficulty with these? I recently found out that they don't compile out-of-the-box on gentoo due to some lablgtk packaging incompatibilities.
I have two main problems with these :
  • Tarballs for older releases are removed from the server (I can't find 20081228 anywhere)
  • The latest version needs ocaml-zip >= 1.04 and we only have 1.03 in the current Fedora release. And if Spring-Installer is to enter Fedora, it cannot force a more recent version of another package, so I'm staying with 20081228 for now.
Other than that, it worked fine. Are you the author ?
abompard
Posts: 19
Joined: 17 Jan 2009, 18:26

Re: CMake fixes

Post by abompard »

Tobi wrote:
Auswaschbar wrote:Spring does not need allegro library.
When some other thread was posted about this I noticed somewhere some distributions actually have libdevil depend on allegro, IIRC...
You're right, actually it's the DevIL-ILUT package which brings Allegro, but for some reason the compilation options of Allegro (-Wl,--export-dynamic -lalleg-4.2.2 -lalleg_unsharable) must be added to the compiler line. I suppose it comes from one of these options, but I don't know why. (As strange as it may seem, I'm a packager but I know very little C/C++...)
Auswaschbar
Spring Developer
Posts: 1254
Joined: 24 Jun 2007, 08:34

Re: CMake fixes

Post by Auswaschbar »

abompard wrote:
det wrote:I see you have packaged spring-installer and ca-installer as well, Thanks! Was there any difficulty with these? I recently found out that they don't compile out-of-the-box on gentoo due to some lablgtk packaging incompatibilities.
I have two main problems with these :
  • Tarballs for older releases are removed from the server (I can't find 20081228 anywhere)
  • The latest version needs ocaml-zip >= 1.04 and we only have 1.03 in the current Fedora release. And if Spring-Installer is to enter Fedora, it cannot force a more recent version of another package, so I'm staying with 20081228 for now.
Other than that, it worked fine. Are you the author ?
Yes, he is the author.
  • I asked him about tarballs because I wanted to make ebuilds for it, he said he will make some
  • gentoo also has camlzip in version 1.03, and it works here with some modifications he will include
Is there a way to get in touch with the maintainer of the Devil-package, mailinglist, bugtracker etc?
abompard
Posts: 19
Joined: 17 Jan 2009, 18:26

Re: CMake fixes

Post by abompard »

Auswaschbar wrote: Yes, he is the author.
  • I asked him about tarballs because I wanted to make ebuilds for it, he said he will make some
  • gentoo also has camlzip in version 1.03, and it works here with some modifications he will include
Great news ! I contacted him too, but got no reply yet. Det, sorry for the duplication...
Auswaschbar wrote: Is there a way to get in touch with the maintainer of the Devil-package, mailinglist, bugtracker etc?
If you mean in Fedora, the preferred way is to open a bug at https://bugzilla.redhat.com.
If it's not about a bug or a feature request, you can use the devil-owner[AT]fedoraproject(.)org email alias.
Post Reply

Return to “Engine”