Home | History | Annotate | Download | only in cmake
      1 
      2 # DE defines
      3 set(DE_COMPILER	"DE_COMPILER_GCC")
      4 set(DE_OS       "DE_OS_SYMBIAN")
      5 set(DE_CPU      "DE_CPU_ARM")
      6 
      7 # switch off the compiler tests -- these error out unnecessarily otherwise
      8 SET(CMAKE_C_COMPILER_WORKS    1)
      9 SET(CMAKE_C_COMPILER_FORCED   1)
     10 SET(CMAKE_CXX_COMPILER_WORKS  1)
     11 SET(CMAKE_CXX_COMPILER_FORCED 1)
     12 
     13 # Set prefixes and suffixes for targets
     14 SET(CMAKE_STATIC_LIBRARY_PREFIX "")
     15 SET(CMAKE_STATIC_LIBRARY_SUFFIX ".lib")
     16 SET(CMAKE_SHARED_LIBRARY_PREFIX "")
     17 SET(CMAKE_SHARED_LIBRARY_SUFFIX ".dso")
     18 SET(CMAKE_IMPORT_LIBRARY_PREFIX "")
     19 SET(CMAKE_IMPORT_LIBRARY_SUFFIX ".lib")
     20 SET(CMAKE_EXECUTABLE_SUFFIX ".exe")
     21 SET(CMAKE_LINK_LIBRARY_SUFFIX ".lib")
     22 SET(CMAKE_DL_LIBS "")
     23 
     24 set(CMAKE_SYSTEM_NAME "Symbian")
     25 
     26 set(CMAKE_FIND_LIBRARY_PREFIXES "")
     27 set(CMAKE_FIND_LIBRARY_SUFFIXES ".dso")
     28 
     29 # Symbian Epoc32 directory setup.
     30 set(SYMBIAN_SDK_PATH	"c:/Nokia/devices/Nokia_Symbian3_SDK_v1.0" CACHE STRING "Symbian SDK root directory")
     31 set(SYMBIAN_EPOCROOT	${SYMBIAN_SDK_PATH}/Epoc32)
     32 
     33 # Codesourcery compiler setup
     34 set(ARM_CC_BASE				"c:/Program Files/CodeSourcery/Sourcery G++ Lite" CACHE STRING "CodeSourcery ARM ELF compiler path")
     35 set(CROSS_COMPILER_PREFIX	"${ARM_CC_BASE}/bin/arm-none-symbianelf-" CACHE STRING "Cross compiler prefix")
     36 
     37 # CMAKE compiler executables
     38 set(CMAKE_C_COMPILER "${CROSS_COMPILER_PREFIX}gcc.exe")
     39 set(CMAKE_CXX_COMPILER "${CROSS_COMPILER_PREFIX}g++.exe")
     40 set(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?
     44 set(COMPILER_INCLUDE_DIR "${ARM_CC_BASE}/lib/gcc/arm-none-symbianelf/4.4.1/include")
     45 set(COMPILER_LIB_DIR ${ARM_CC_BASE}/lib/gcc/arm-none-symbianelf/4.4.1 ${ARM_CC_BASE}/arm-none-symbianelf/lib)
     46 
     47 set(SYMBIAN_LIB_DIR ${SYMBIAN_EPOCROOT}/release/armv5/lib)
     48 
     49 # Search libs and include files (but not programs) from toolchain dir.
     50 set(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 
     52 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
     53 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
     54 set(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
     58 if (CMAKE_GENERATOR MATCHES "NMake")
     59 	set(CMAKE_START_TEMP_FILE "@<<\n")
     60 	set(CMAKE_END_TEMP_FILE "\n<<")
     61 endif (CMAKE_GENERATOR MATCHES "NMake")
     62