FreeOrion

Forums for the FreeOrion project
It is currently Thu May 23, 2013 8:15 am

All times are UTC




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Wed Sep 01, 2010 11:07 am 
Offline
Space Floater
User avatar

Joined: Sat Mar 24, 2007 8:28 am
Posts: 18
Hello World,

I have GG in the following folder:
J:\QUARTS\_dev\src\CAD\GG
and I have Boost as a sibling:
J:\QUARTIS\_dev\src\CAD\boost

But CMake in GG does not find boost. I tried setting the INCLUDE, BOOST_ROOT, CMAKE_INCLUDE_PATH (and some other) variables, but to no avail. How can I tell CMake where Boost is?

J: is a subst-ed drive
boost is a junction to boost1_44_0 (I tried the above also with the non-substed and non-junctioned path)

System:
Win 7 Professional with all patches applied
GiGi from SVN (r813)
CMake 2.8
Visual Studio 2010 Ultimate

TIA and best regards
Andreas


Top
 Profile  
 
 Post subject: Re: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Wed Sep 01, 2010 4:02 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
If you're having trouble with CMake, you could import the MSVS 2008 project files that are available in SVN. Hopefully they would work without major problems.

That said, you're likely to have issues with some of the dependencies in the Win32 SDK, if you're using it, being built with MSVS 2008 if you try to link in MSVS 2010. You may need to rebuild several of them. See here: viewtopic.php?p=44021#p44021

As to the CMake issue, try editing CMakeLists.txt in the GG root directory to change
Code:
set(MINIMUM_BOOST_VERSION 1.36.0)
to
Code:
set(MINIMUM_BOOST_VERSION 1.44.0)


You may also need to edit FindBoost.cmake in the CMake directory or add an extra line to CMakeLists.txt for GG to add your Boost version. See this excerpt:
FindBoost.cmake in CMake 2.8 wrote:
Code:
# =========== The mess that is Boost_ADDITIONAL_VERSIONS (sorry?) ============
#
# OK, so the Boost_ADDITIONAL_VERSIONS variable can be used to specify a list of
# boost version numbers that should be taken into account when searching
# for Boost. Unfortunately boost puts the version number into the
# actual filename for the libraries, so this variable will certainly be needed
# in the future when new Boost versions are released.
#
# Currently this module searches for the following version numbers:
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0,
# 1.40, 1.40.0, 1.41, 1.41.0
#
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
# add both 1.x and 1.x.0 as shown above.  Official Boost include directories
# omit the 3rd version number from include paths if it is 0 although not all
# binary Boost releases do so.
#
# SET(Boost_ADDITIONAL_VERSIONS "1.78" "1.78.0" "1.79" "1.79.0")


Top
 Profile  
 
 Post subject: Re: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Tue Sep 07, 2010 3:14 pm 
Offline
Space Floater
User avatar

Joined: Sat Mar 24, 2007 8:28 am
Posts: 18
Unfortunately, there are no MSVS project files in the GG directory (I suppose there are somewhere in the FreeOrion directory; if yes: I just want to compile Gigi, not FreeOrion).

I also tried to change the CMakeLists.txt file, but no success either.

Any other hints?

TIA and best regards
Andreas


Top
 Profile  
 
 Post subject: Re: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Tue Sep 07, 2010 6:12 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
StarFire wrote:
Unfortunately, there are no MSVS project files in the GG directory (I suppose there are somewhere in the FreeOrion directory; if yes: I just want to compile Gigi, not FreeOrion).

The FreeOrion MSVS 2008 solution has six projects, of which three are for building GiGi libraries. These can be built independently of the FreeOrion projects.

Quote:
I also tried to change the CMakeLists.txt file, but no success either.

You probably need to edit FindBoost.cmake within the CMake directories, not the FreeOrion CMakeLists.txt.


Top
 Profile  
 
 Post subject: Re: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Tue Sep 21, 2010 3:34 pm 
Offline
Space Floater
User avatar

Joined: Sat Mar 24, 2007 8:28 am
Posts: 18
Quote:
I also tried to change the CMakeLists.txt file, but no success either.
Quote:
You probably need to edit FindBoost.cmake within the CMake directories, not the FreeOrion CMakeLists.txt.


I looked for FindBoost.cmake, but I didn't find a file with that name, neither in the GG nor in the freeorion directories. I have cmake 2.8 for Windows and I looked into the share/Modules folder, and it was missing there too. So I suppose that file was forgotten in the cmake Windows package.


Top
 Profile  
 
 Post subject: Re: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Tue Sep 21, 2010 9:58 pm 
Offline
Programming, Design, and De Facto Lead
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 7891
Location: Vancouver, BC
StarFire wrote:
I looked for FindBoost.cmake, but I didn't find a file with that name, neither in the GG nor in the freeorion directories. I have cmake 2.8 for Windows and I looked into the share/Modules folder, and it was missing there too. So I suppose that file was forgotten in the cmake Windows package.

In my install of CMake 2.8, FindBoost.cmake is located in C:\Program Files\CMake 2.8\share\cmake-2.8\Modules

The same directory has over 300 files, which 250 appear to be .cmake files.


Top
 Profile  
 
 Post subject: Re: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Thu Sep 23, 2010 9:03 am 
Offline
Space Floater
User avatar

Joined: Sat Mar 24, 2007 8:28 am
Posts: 18
Geoff the Medio wrote:
In my install of CMake 2.8, FindBoost.cmake is located in C:\Program Files\CMake 2.8\share\cmake-2.8\Modules

The same directory has over 300 files, which 250 appear to be .cmake files.


As a matter of fact, it's in there. I must have missed it, when I looked last time.
I'll try to change it for my needs later.

Thank you
Andreas


Top
 Profile  
 
 Post subject: Re: Compiling GiGi: CMake does not find Boost (Win7)
PostPosted: Tue Oct 12, 2010 1:29 pm 
Offline
Space Floater
User avatar

Joined: Sat Mar 24, 2007 8:28 am
Posts: 18
It didn't work, so I give up on CMake.

CMake seems to be a good build tool as long as the libraries and include files are at defined places (as it is on all *nixes), but if the libs and includes are anywhere on the filesystem ...

I'll try with the VS2008 projects from FreeOrion

Thank you for your help
Andreas


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group