[CMake] CMake

Nicola Brisotto nicolabrisotto at gmail.com
Thu Sep 30 11:56:51 EDT 2010


I use Qt creator with cmake for desktop application and it work well. It has support for out of source build, it populate the project browser with you source and header, etc
My main issue is not a full Qt Creator integration. My first need is build with cmake from console.

Currently Qt support 2 toolchain: abdl and raptor.



I



> http://www.paraview.org/Wiki/CMake_Cross_Compiling

After reading Wiley - "Porting to the Symbian Platform Open Mobile Development in C and C++", chapter 2.5.2 and 2.5.3 and some tutorial I understand that abdl uses 3 kind of file:
1) one bdl.inf 
2) one or more *.mpp file
3) optionally a pkg file

You process these files with a tool named 'bldmake' and will obtain a batch file ('ABLD.BAT') and some makefiles that will build the application for you.

This tool exists mainly because a Symbian application is usually built for many platforms: 
the emulator, using a Microsoft X86 compiler, 
as well as the real device using a gcc-derived ARM compiler. 

The bldmake saves you from writing specially crafted makefiles for these compilers and make utilities; also it allows for building many targets with just a single command.
From the bld.inf, type:
     > bldmake bldfiles
Of course, you must have the PATH set correctly for the installation of the SDK you are using. This command will look for the bld.inf, process it and the related *.mmp, then generate a BATCH file named ABLD.BAT. Now you have all you need to build your applications. Simply type:
     > abld build
This will build your application in all the available flavors.
Note that the target files are stored in a very deep directory structure, and you are building both in debug and release versions for WINS (windows), ARM4 (plain arm), ARMI (speed optimized arm), THUMB (size optimized ARM)! 
But you can choose to build for only one target, and since it take less time, you usually build ONLY for one version of one target. For example, to build for the emulator only in the debug version, or for the device, optimized for size, in release version, you type:
     > abld build wins udeb
     > abld buind thumb urel
Building for Windows is enough to start the emulator and run the application in the emulated environment. Application files are compiled and placed straight where the emulator can run it: no need to copy them in the right location. 

But for real devices, you have to pack everything in a .sis file for installation, send it to the phone and install the application. You are required to write a .pkg file to describe the installer, and then create it with:
     > makesis file.pkg

this is a small example:
Here is a simple example of a bld.inf file:

PRJ_PLATFORMS
DEFAULT 
PRJ_EXPORTS 
..\inc\SoundTouch.h 
..\inc\FIFOSamplePipe.h 
..\inc\FIFOSampleBuffer.h 
..\inc\STTypes.h 
PRJ_MMPFILES 
SoundTouch.mmp

This specifies that the project should generate makefiles for the default platforms (currently WINSCW, ARMV5 and GCCE), export four header files and build a single component which is specified in SoundTouch.mmp. The corresponding MMP file looks like this:

TARGET         SoundTouch.dll
TARGETTYPE   dll    
UID               0x1000008D 0x0839739D
CAPABILITY     None
USERINCLUDE         ..\inc
SYSTEMINCLUDE     \epoc32\include \epoc32\include\stdapis
SYSTEMINCLUDE     \epoc32\include\stdapis\sys 
SYSTEMINCLUDE     \epoc32\include\stdapis\stlport 
SOURCEPATH         ..\src 
SOURCE                 SoundTouch.cpp AAFilter.cpp
SOURCE                FIFOSampleBuffer.cpp FIRFilter.cpp
SOURCE                RateTransposer.cpp TDStretch.cpp
LIBRARY                euser.lib
LIBRARY                libc.lib libm.lib libstdcpp.lib

Do we need a custom generator to recreate this process with cmake?


> http://www.itk.org/Wiki/Symbian_Carbide_Generator
I'm not sure but this generator produce a project for carbide so I need carbide to build a project. Is it right?

Now there is alternative tool chains called Raptor that claim to be compatible with the bld/mmp interface. When take a look at will advice.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100930/7384b271/attachment-0001.htm>


More information about the CMake mailing list