Hello,

I've taken a look at CMake and migrated a little tool I develop. CMake is
really a nice build system it is fast and handles libsuffix for x86_64 by
default (currently a problem with scons). http://www.cmake.org/

So here are my ideas:

1. Create modules for cmake for all headers and libs we use

cmake/modules
FindZLIB
FindUUID
FindFFMPEG
FindFFMPEGInternal
FindCurl
FindCurlInternal
FindBoost
FindOpenssl
FindOpensslInternal
FindQt4
...

Prototype: attached

This gives us the possability to check for all required or optional libs
and headers. FindLIBInternal means a lib in the source. It doesn't make
sense to use shipped source of ffmpeg, speex, curl, openssl on UNIX
systems.

if(UNIX)
        FIND_PACKAGE(Openssl REQUIRED)
else(UNIX)
        FIND_PACKAGE(OpensslInternal REQUIRED)
endif(UNIX)

-----
FIND_PACKAGE(Qt4 REQUIRED)
-----

or

-----
# make some more macros available
INCLUDE(MacroLibrary)

# macro_optional_find_package() is the same as FIND_PACKAGE(<name>) but
additionally creates an OPTION(WITH_<name>)
# so the checking for the software can be disabled via ccmake or
-DWITH_<name>=OFF
MACRO_OPTIONAL_FIND_PACKAGE(FFMPEG)
-----

So if we have ffmpeg, build with video support ;)


We can use existing modules from KDE
http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/

2. Create CMakeLists.txt files for each lib/subproject

If everything compiles just fine we go to step 3.

3. add INSTALL() for all needed files (libphapi.so qtwengophone emoticons/
...)

In the main CMakeLists.txt add

# the projectname, which we need in other modules
SET(PROJECTNAME "wengophone")

WengoInstall: attached

INSTALL(TARGETS <file> DESTINATION ${BIN_INSTALL_DIR})
INSTALL(FILES *.png DESTINATION ${DATA_INSTALL_DIR}/emoticons)
...


Best regards,

     -- andreas

Attachment: FindPrototype.cmake
Description: Binary data

Attachment: WengoInstall.cmake
Description: Binary data

_______________________________________________
Wengophone-devel mailing list
[email protected]
http://dev.openwengo.com/mailman/listinfo/wengophone-devel

Reply via email to