Compile under with Bullet library in a non-standard location

Questions, problems and discussion about compiling FreeOrion.

Moderator: Oberlus

Post Reply
Message
Author
spaceship
Space Krill
Posts: 1
Joined: Fri Jan 09, 2015 7:55 pm

Compile under with Bullet library in a non-standard location

#1 Post by spaceship »

Hello.

I'm trying to compile FreeOrion in GNU/Linux. My distribution doesn't has Bullet in its package directory and I want to avoid using unofficial packages. I compiled Bullet 2.82 with “cmake -DINSTALL_LIBS=on -DBUILD_SHARED_LIBS=on” as the wiki instructions say. Now, how can I use Bullet from this location while compiling FreeOrion?.

I tried passing -DCMAKE_PREFIX_PATH, -DCMAKE_INCLUDE_PATH and -DCMAKE_LIBRARY_PATH with either the top of the bullet direcotry, or /src/ within it, but neither works.

How can I comile FreeOrion with Bullet 2.82 compiled in a non-standard location?.

Regards and thanks in advance.

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

Re: Compile under with Bullet library in a non-standard loca

#2 Post by Geoff the Medio »

spaceship wrote:I tried passing -DCMAKE_PREFIX_PATH, -DCMAKE_INCLUDE_PATH and -DCMAKE_LIBRARY_PATH with either the top of the bullet direcotry, or /src/ within it, but neither works.
What / how doesn't what work? What error messages do you get and what specifically are you trying to do? Run the compile, or generate the build system from CMake?

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

Re: Compile under with Bullet library in a non-standard loca

#3 Post by Dilvish »

spaceship wrote:How can I comile FreeOrion with Bullet 2.82 compiled in a non-standard location?.
just passing a command line directive to cmake might not be enough, because it seems that cmake gets re-triggered, as an additional cmake pass for the GG component, and sometimes also just upon running make, and I think I recall running into the problem that the directive would not get passed on in that case. What I recommend is that first you run "cmake .", and then run "ccmake ." to pull up a gui interface. Note the addition "c" in the command. You may need to install ccmake; on my installation ccmake comes from the curses-gui package. I think there may also be other cmake guis available. From the ccmake interface you can press the 't' key to toggle into advanced mode, and then you can scroll through all the cmake variables in the local cmake cache, and set them as you please. They include a directory setting for the bullet library and its header file. You then press 'c' for it to save that configuration to the cmake cache, and then 'e' to exit that screen and 'q' to quit ccmake. Thereafter even if you rerun cmake it should still use those values, so long as you haven't erased the cache.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply