symbian.cmake
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
parent 0 bde4ae8d615e
permissions -rw-r--r--
Update contrib.
     1 # Copyright (c) 2012 Stéphane Lenclud.
     2 # All rights reserved.
     3 # This component and the accompanying materials are made available
     4 # under the terms of the License "Eclipse Public License v1.0"
     5 # which accompanies this distribution, and is available
     6 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 #
     8 # Initial Contributors:
     9 # Stéphane Lenclud.
    10 #
    11 
    12 
    13 #Make sure all the output from all projects will go in one place
    14 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
    15 #------------------------------------------------------------------
    16 
    17 project (symbian)
    18 
    19 #Global defines will apply to all our binaries
    20 add_definitions(-DUNICODE)
    21 add_definitions(-D_UNICODE)
    22 add_definitions(-D__VC32__)
    23 add_definitions(-D__WINS__)
    24 add_definitions(-D__SYMC__)
    25 add_definitions(-D__LEAVE_EQUALS_THROW__)
    26 add_definitions(-D__SUPPORT_CPP_EXCEPTIONS__)
    27 add_definitions(-D__PLATSEC_UNLOCKED__)
    28 add_definitions(-DMONITOR_THREAD_CPU_TIME)
    29 add_definitions(-DSYMBIAN_FIX_TDESC_CONSTRUCTORS)
    30 # TODO: I guess public stuff should also define SYMBIAN_ENABLE_SPLIT_HEADERS 
    31 
    32 
    33 
    34 #-------------------------------------------------------------
    35 add_subdirectory(./os/kernelhwsrv/kernel/eka)
    36 ## Add ecust DLL
    37 add_subdirectory(./os/boardsupport/emulator/emulatorbsp)
    38 ## Add btracex LDD
    39 add_subdirectory(./os/kernelhwsrv/kernel/eka/drivers/trace)
    40 ## Add elocd.ldd
    41 add_subdirectory(./os/kernelhwsrv/kernel/eka/drivers/locmedia)
    42 ## Add efile.exe
    43 add_subdirectory(./os/kernelhwsrv/userlibandfileserver/fileserver/group)
    44 ## Add domain manager
    45 add_subdirectory(./os/kernelhwsrv/userlibandfileserver/domainmgr/group)
    46 ## Add hal.dll
    47 add_subdirectory(./os/boardsupport/emulator/emulatorbsp/hal)
    48 ## Add estor, centralrepository...
    49 add_subdirectory(./os/persistentdata)
    50 ## Add bafl
    51 add_subdirectory(./os/ossrv/lowlevellibsandfws/apputils/group)
    52 ## Add bsul
    53 add_subdirectory(./os/ossrv/lowlevellibsandfws/apputils/bsul/group)
    54 ## Add charconv
    55 add_subdirectory(./os/textandloc/charconvfw/charconv_fw/group)
    56 ## Add Multimedia
    57 add_subdirectory(./os/mm/mmlibs/mmfw/group)
    58 ## Add window server
    59 add_subdirectory(./os/graphics/windowing/windowserver/group)
    60 ## Add font store
    61 add_subdirectory(./os/textandloc/fontservices/fontstore/group)
    62 ## Add gdi
    63 add_subdirectory(./os/graphics/graphicsdeviceinterface/gdi/group)
    64 add_subdirectory(./os/graphics/graphicsdeviceinterface/bitgdi/group)
    65 add_subdirectory(./os/graphics/graphicsdeviceinterface/screendriver/group)
    66 add_subdirectory(./os/graphics/fbs/fontandbitmapserver/group)
    67 ## Add ecom
    68 add_subdirectory(./os/ossrv/lowlevellibsandfws/pluginfw/Group)
    69 ## Add tests
    70 add_subdirectory(./os/kernelhwsrv/kerneltest)
    71 #-------------------------------------------------------------
    72 
    73 #Copy epoc.ini to binary directory
    74 #Not used anymore we are using configure instead, see below
    75 #install(	FILES 
    76 #			${PROJECT_SOURCE_DIR}/symc/epoc.ini
    77 #			DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${BUILD_TYPE}/data )
    78 
    79 
    80 #If SYMC_DRIVE_C is not defined we default to parent folder
    81 if (NOT DEFINED SYMC_DRIVE_C)
    82     set(SYMC_DRIVE_C_NOT_DEFINED ON)
    83 endif()
    84 
    85 
    86 ###### Configure epoc.ini
    87 set(DEBUG_EPOC_INI "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/data/epoc.ini")
    88 set(RELEASE_EPOC_INI "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/data/epoc.ini")
    89 
    90 #Specify default C drive root for debug build
    91 if (DEFINED SYMC_DRIVE_C_NOT_DEFINED)
    92     set(SYMC_DRIVE_C "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Debug/c" )
    93 endif()
    94 
    95 #Configure epoc.ini for debug build
    96 configure_file( ${PROJECT_SOURCE_DIR}/symc/epoc.ini ${DEBUG_EPOC_INI})
    97 
    98 #Specify default C drive root for release build
    99 if (DEFINED SYMC_DRIVE_C_NOT_DEFINED)
   100     set(SYMC_DRIVE_C "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/c" )
   101 endif()
   102 
   103 #Configure epoc.ini for release build
   104 configure_file( ${PROJECT_SOURCE_DIR}/symc/epoc.ini ${RELEASE_EPOC_INI})
   105 
   106 #Add a custom target just to group our cmake files together
   107 file(GLOB_RECURSE DotCMakeFiles	"./*.cmake")
   108 add_custom_target(symbian SOURCES ${source}	${DotCMakeFiles} ./symc/epoc.ini ${DEBUG_EPOC_INI} ${RELEASE_EPOC_INI})	
   109 source_group(CMake FILES ${DotCMakeFiles} ${CMAKE_CURRENT_LIST_FILE} )	
   110 source_group(Data FILES ./symc/epoc.ini)
   111 source_group(Data\\Debug FILES ${DEBUG_EPOC_INI})
   112 source_group(Data\\Release FILES ${RELEASE_EPOC_INI})
   113