[Bf-committers] CMake build options

Tony Agee tonyagee at cox.net
Mon Nov 20 21:32:16 CET 2006


Thanks for the tips Chris. I was already doing "out-of-source" builds.
CMakeCache.txt does have those options, now that I look, but I'll just point
out that the name of the file could be more indicative of it's purpose.
But I stand by what I said earlier, there should be a "CMake-config.txt" in
the blender dir, that is not under source control, that contains the primary
options for the makefile generation phase. It just seems backwards to:

a) generate the makefiles.
b) edit CMakeCache.txt
c) do the build.

As opposed to autotool builds where you give options on the 'configure'
command line, generate the makefiles, and build. Or Scons, where you edit
user-config.py, then build. I suppose it's just a matter of what you're used
to, but it seems weird.

Also, In CMakeLists.txt, there is a comment giving an example of how to use
cmake command line options to specify the python include and library paths:

# cmake -D PYTHON_LIB=/usr/local/lib/python2.3/config/libpython2.3.so -D \
PYTHON_INC=/usr/local/include/python2.3 -G "Unix Makefiles" ../blender

The example command line seems to be bogus, cmake barfs on the spaces after
"-D".

The reason I learned that is that the linux build I reported success on
earlier, didn't actually succeed. I had forgotten that I had redirected
stdout to a logfile. (blush) The problem was at linking blender, a looooong
list of undefined references to Python stuff. I used ccmake to examine the
build config:
 PYTHON_INC = /usr/include/python2.4
 PYTHON_INCLUDE_PATH = /usr/include/python2.4
 PYTHON_LIB = /usr/lib/python2.4/config/libpython2.4.a
 PYTHON_LIBRARY = /usr/lib/python2.4/config/libpython2.4.a

Those paths are all correct, but building did not succeed till I changed
PYTHON_LIB and PYTHON_LIBRARY to /usr/lib/libpython2.4.so.

Tony.

-----Original Message-----
From: bf-committers-bounces at projects.blender.org
[mailto:bf-committers-bounces at projects.blender.org] On Behalf Of Chris Want
Sent: Monday, November 20, 2006 10:43 AM
To: bf-blender developers
Subject: Re: [Bf-committers] CMake build options

Tony Agee wrote:
> Also, having the file used to set build options (blender/CMakeLists.txt) 
> under source control is a bit problematic. If I change build options, 
> then the defaults are changed in CVS (as happened yesterday) then a CVS 
> update will (did) fail to properly update my file. We need something 
> like user-config.py, as in Scons.

The system creates a CMakeCache.txt that should have any local
config options in it. Also, this system works best with
out-of-source builds, which helps keep your source tree
nice and clean. For linux, try using the 'ccmake' version
of the program for a nice user interface for configuring
the sources.

Chris

_______________________________________________
Bf-committers mailing list
Bf-committers at projects.blender.org
http://projects.blender.org/mailman/listinfo/bf-committers



More information about the Bf-committers mailing list