Update contrib.
1 # Copyright (c) 2012 Stéphane Lenclud.
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".
8 # Initial Contributors:
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 #------------------------------------------------------------------
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
34 #-------------------------------------------------------------
35 add_subdirectory(./os/kernelhwsrv/kernel/eka)
37 add_subdirectory(./os/boardsupport/emulator/emulatorbsp)
39 add_subdirectory(./os/kernelhwsrv/kernel/eka/drivers/trace)
41 add_subdirectory(./os/kernelhwsrv/kernel/eka/drivers/locmedia)
43 add_subdirectory(./os/kernelhwsrv/userlibandfileserver/fileserver/group)
45 add_subdirectory(./os/kernelhwsrv/userlibandfileserver/domainmgr/group)
47 add_subdirectory(./os/boardsupport/emulator/emulatorbsp/hal)
48 ## Add estor, centralrepository...
49 add_subdirectory(./os/persistentdata)
51 add_subdirectory(./os/ossrv/lowlevellibsandfws/apputils/group)
53 add_subdirectory(./os/ossrv/lowlevellibsandfws/apputils/bsul/group)
55 add_subdirectory(./os/textandloc/charconvfw/charconv_fw/group)
57 add_subdirectory(./os/mm/mmlibs/mmfw/group)
59 add_subdirectory(./os/graphics/windowing/windowserver/group)
61 add_subdirectory(./os/textandloc/fontservices/fontstore/group)
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)
68 add_subdirectory(./os/ossrv/lowlevellibsandfws/pluginfw/Group)
70 add_subdirectory(./os/kernelhwsrv/kerneltest)
71 #-------------------------------------------------------------
73 #Copy epoc.ini to binary directory
74 #Not used anymore we are using configure instead, see below
76 # ${PROJECT_SOURCE_DIR}/symc/epoc.ini
77 # DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/\${BUILD_TYPE}/data )
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)
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")
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" )
95 #Configure epoc.ini for debug build
96 configure_file( ${PROJECT_SOURCE_DIR}/symc/epoc.ini ${DEBUG_EPOC_INI})
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" )
103 #Configure epoc.ini for release build
104 configure_file( ${PROJECT_SOURCE_DIR}/symc/epoc.ini ${RELEASE_EPOC_INI})
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})