Patch: Prefer GIGIDIR over pkgconfig

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
adrian_broher
Programmer
Posts: 1155
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Patch: Prefer GIGIDIR over pkgconfig

#1 Post by adrian_broher »

Hello fo-devs,

the current implementation of the FindGiGi.cmake expects that either pkg-config isn't installed or the GiGi library has installed the corresponding .pc configuration file in a pkg-config search path.

Attached is a patch, that prefers always the CMake GIGIDIR variable if set. This allows to explicit point out to a GiGi project directory without installing GiGi.

The patch is released under the GPL 2.0 (or later) license.

Regards

Marcel Metz
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 12770
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Patch: Prefer GIGIDIR over pkgconfig

#2 Post by Geoff the Medio »

Could someone who builds with CMake comment on whether this patch works without any problems?

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Patch: Prefer GIGIDIR over pkgconfig

#3 Post by gvdm »

I applied this patch, deleted CMakeCache.txt and rebuilt, everything went fine.
However, do note, I use

Code: Select all

cmake -DCMAKE_INCLUDE_PATH=GG -DCMAKE_LIBRARY_PATH=GG .
as I don't install GG, I just build it and then point freeorion at the GG dir as its there already (might be nice to add to the wiki, it allows a completely local install inside the build dir which is where I run freeorion from).

Given this it may be nice to have another tester try this as well.

gvdm
Space Floater
Posts: 43
Joined: Sun Nov 06, 2011 11:04 am

Re: Patch: Prefer GIGIDIR over pkgconfig

#4 Post by gvdm »

* woops, it was applied it seems - ignore this post

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: Patch: Prefer GIGIDIR over pkgconfig

#5 Post by Dilvish »

given that our setup relies on our custom GG version, why don't we just have GIGIDIR default to being defined as 'GG' ?

It would also be nice for the top level make process to also initiate make for the GG subdir, so that when people put in changes into GG, like as was just done with [5961], people like me don't have to go through a compile process and failure & take time to figure out, oh, GG was updated....
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
adrian_broher
Programmer
Posts: 1155
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: Patch: Prefer GIGIDIR over pkgconfig

#6 Post by adrian_broher »

Dilvish wrote:It would also be nice for the top level make process to also initiate make for the GG subdir, so that when people put in changes into GG, like as was just done with [5961], people like me don't have to go through a compile process and failure & take time to figure out, oh, GG was updated....
I already have this ready. However the CMakeFiles need some cleanup before you can consider applying this.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Post Reply