Skip to content

Cmake

cmake seems like a good alternative for autogen automake a a cross-platform makefile generator. I will investigate this, but for now a couple of usable tips.

listing options

list
cmake -l

Will print a list of settable options for the project to be built. For instance :

output
1
2
3
4
5
6
7
8
speech/cmdline:BOOL=TRUE
speech/dbus:BOOL=FALSE
speech/espeak:BOOL=FALSE
speech/iphone:BOOL=FALSE
speech/speech_dispatcher:BOOL=FALSE
support/espeak:BOOL=FALSE
support/ezxml:BOOL=FALSE 
...

To enable such an option , do

set option
cmake -D speech/espeak:BOOL=TRUE -D support/espeak:BOOL=TRUE ..

Do not forget the .. for the directory in which the sources are. And since i found espeak two times, i enabled them both, in support and in speech. The output of that command will now say.

output
1
2
3
4
5
6
7
--->>> speech
Disabled  android ( Default )
Enabled   cmdline ( system() call is available )
Disabled  dbus ( dbus-glib-1 not found )
Enabled   espeak ( User defined )
Disabled  iphone ( Default )
Disabled  speech_dispatcher ( speech_dispatcher lib not found )

So make it and try.

debugging

Start cmake like this to get makefile including debugging information :

debug info
cmake -DCMAKE_BUILD_TYPE:STRING=Debug ..

The main configuration file is ../CMakeList.txt (from build) and you can follow all includes downwards from build/Makefile to see what is going wrong.