1 2# DE defines 3set(DE_COMPILER "DE_COMPILER_GCC") 4set(DE_OS "DE_OS_SYMBIAN") 5set(DE_CPU "DE_CPU_ARM") 6 7# switch off the compiler tests -- these error out unnecessarily otherwise 8SET(CMAKE_C_COMPILER_WORKS 1) 9SET(CMAKE_C_COMPILER_FORCED 1) 10SET(CMAKE_CXX_COMPILER_WORKS 1) 11SET(CMAKE_CXX_COMPILER_FORCED 1) 12 13# Set prefixes and suffixes for targets 14SET(CMAKE_STATIC_LIBRARY_PREFIX "") 15SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib") 16SET(CMAKE_SHARED_LIBRARY_PREFIX "") 17SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dso") 18SET(CMAKE_IMPORT_LIBRARY_PREFIX "") 19SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib") 20SET(CMAKE_EXECUTABLE_SUFFIX ".exe") 21SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib") 22SET(CMAKE_DL_LIBS "") 23 24set(CMAKE_SYSTEM_NAME "Symbian") 25 26set(CMAKE_FIND_LIBRARY_PREFIXES "") 27set(CMAKE_FIND_LIBRARY_SUFFIXES ".dso") 28 29# Symbian Epoc32 directory setup. 30set(SYMBIAN_SDK_PATH "c:/Nokia/devices/Nokia_Symbian3_SDK_v1.0" CACHE STRING "Symbian SDK root directory") 31set(SYMBIAN_EPOCROOT ${SYMBIAN_SDK_PATH}/Epoc32) 32 33# Codesourcery compiler setup 34set(ARM_CC_BASE "c:/Program Files/CodeSourcery/Sourcery G++ Lite" CACHE STRING "CodeSourcery ARM ELF compiler path") 35set(CROSS_COMPILER_PREFIX "${ARM_CC_BASE}/bin/arm-none-symbianelf-" CACHE STRING "Cross compiler prefix") 36 37# CMAKE compiler executables 38set(CMAKE_C_COMPILER "${CROSS_COMPILER_PREFIX}gcc.exe") 39set(CMAKE_CXX_COMPILER "${CROSS_COMPILER_PREFIX}g++.exe") 40set(CMAKE_LINKER "${CROSS_COMPILER_PREFIX}ld.exe") 41 42# Some shortcut variables for later use. See CFlags.cmake 43# TODO: Should these be in CFlags.cmake instead? 44set(COMPILER_INCLUDE_DIR "${ARM_CC_BASE}/lib/gcc/arm-none-symbianelf/4.4.1/include") 45set(COMPILER_LIB_DIR ${ARM_CC_BASE}/lib/gcc/arm-none-symbianelf/4.4.1 ${ARM_CC_BASE}/arm-none-symbianelf/lib) 46 47set(SYMBIAN_LIB_DIR ${SYMBIAN_EPOCROOT}/release/armv5/lib) 48 49# Search libs and include files (but not programs) from toolchain dir. 50set(CMAKE_FIND_ROOT_PATH ${SYMBIAN_EPOCROOT}/lib/gcc/arm-none-symbianelf/4.4.1 ${SYMBIAN_EPOCROOT} ${SYMBIAN_EPOCROOT}/release/armv5 ${SYMBIAN_EPOCROOT}/release/armv5/lib) 51 52set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) 53set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) 54set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) 55 56# for nmake make long command lines are redirected to a file 57# with the following syntax, see Windows-bcc32.cmake for use 58if (CMAKE_GENERATOR MATCHES "NMake") 59 set(CMAKE_START_TEMP_FILE "@<<\n") 60 set(CMAKE_END_TEMP_FILE "\n<<") 61endif (CMAKE_GENERATOR MATCHES "NMake") 62