[CMake] generic Symbian gcce-toolchain file

Alexander Neundorf a.neundorf-work at gmx.net
Fri Jul 18 15:44:36 EDT 2008


Hi Frans,

On Thursday 17 July 2008, Frans.Fuerst at elektrobit.com wrote:
> Hi,
>
> I'm trying to use CMake to build Symbian 9.2-FP1 (S60) executables in a
> generic way (i.e. not building mmp-files which have to be interpreted by
> perl-scripts provided with the SDKs). There have been similar questions
> asked here before but I haven't found a complete answer yet that would make
> it possible for me to establish a Symbian-capable build-system from
> scratch.
>
> Is someone out there who can hear me and already managed to compile for a
> Symbian phone using CMake (and willing to share his knowledge)?

I don't think anybody has done that already successfully. But seriously, it 
shouldn't be too hard.

Please try the attached file, put it in the Modules/Platform/ directory of 
your cmake installation.
It's mostly what you had in your toolchain file.
You have to set CMAKE_SYSTEM_NAME to "Symbian" then so this file is used.
I'd say we try to do this step by step, and once the Symbian.cmake file works 
for you (even if with hardcoded stuff), we'll make it generic.
This may require putting some stuff like compiler flags into a 
Symbian-GNU-C[XX].cmake.

You may also need to modify the cmake variables which contain the build 
commands (like CMAKE_C[XX]_LINK_EXECUTABLE etc.), we'll work this out.

Bye
Alex
-------------- next part --------------
# SET(WIN32 1) maybe ?

SET(CMAKE_STATIC_LIBRARY_PREFIX "")
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
SET(CMAKE_SHARED_LIBRARY_PREFIX "")          # lib
SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dll")          # .so
SET(CMAKE_IMPORT_LIBRARY_PREFIX "")
SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib")
SET(CMAKE_EXECUTABLE_SUFFIX ".exe")          # .exe
SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
SET(CMAKE_DL_LIBS "")

SET(CMAKE_FIND_LIBRARY_PREFIXES "")
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib")

# for nmake make long command lines are redirected to a file
# with the following syntax, see Windows-bcc32.cmake for use
IF(CMAKE_GENERATOR MATCHES "NMake")
  SET(CMAKE_START_TEMP_FILE "@<<\n")
  SET(CMAKE_END_TEMP_FILE "\n<<")
ENDIF(CMAKE_GENERATOR MATCHES "NMake")

SET(SYMBIAN 1)


# maybe something like the following:
ADD_DEFINITIONS(-D_UNICODE -D__GCCE__ -D__SYMBIAN32__ -D__SERIES60_31__ -D__SERIES60_3X__ -D__GCCE__
                -D__EPOC32__ -D__MARM__ -D__EABI__ -D__MARM_ARMV5__ -D__EXE__ 
                -D__SUPPORT_CPP_EXCEPTIONS__ -D__MARM_ARMV5__)

# is it more like windows ?
# SET(WIN32 1)
# INCLUDE(Platform/WindowsPaths)

# or like unix, e.g. libraries in lib/ ?
# SET(UNIX 1)
# INCLUDE(Platform/UnixPaths)


More information about the CMake mailing list