kernel/eka/CMakeLists.txt
author Stephane Lenclud <tortoisehg@lenclud.com>
Mon, 04 Jan 2010 16:51:21 +0100
branchanywhere
changeset 22 5c5219488d00
parent 21 af091391d962
child 23 9c130f173b89
permissions -rw-r--r--
Fixing linkage error. First successful euser build.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
18
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     1
# Copyright (c) 2009 Stéphane Lenclud.
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     2
# All rights reserved.
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     3
# This component and the accompanying materials are made available
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     5
# which accompanies this distribution, and is available
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     7
#
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     8
# Initial Contributors:
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
     9
# Stéphane Lenclud.
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    10
#
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    11
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    12
project (eka)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    13
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    14
cmake_minimum_required(VERSION 2.6)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    15
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    16
#add_definitions(-DUNICODE)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    17
add_definitions(-D__VC32__)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    18
add_definitions(-D_UNICODE)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    19
add_definitions(-D__LEAVE_EQUALS_THROW__)
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    20
add_definitions(-D__WINS__)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    21
#__CPU_X86 is declared by __WINS__ 
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    22
#add_definitions(-D__CPU_X86)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    23
add_definitions(-D__DLL__)
18
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    24
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    25
include_directories (./euser ./euser/unicode ./include)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    26
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    27
#Adding the sources from cbase
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    28
set (sourcepath ./euser/cbase/)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    29
set (source ${source}
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    30
${sourcepath}ub_act.cpp ${sourcepath}ub_array.cpp ${sourcepath}ub_bma.cpp ${sourcepath}ub_buf.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    31
${sourcepath}ub_circ.cpp ${sourcepath}ub_cln.cpp ${sourcepath}ub_cons.cpp ${sourcepath}ub_dtim.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    32
${sourcepath}ub_obj.cpp ${sourcepath}ub_svr.cpp ${sourcepath}ub_polsvr.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    33
${sourcepath}ub_tim.cpp ${sourcepath}ub_utl.cpp ${sourcepath}ub_tque.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    34
)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    35
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    36
#Add euser sources
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    37
set (sourcepath ./euser/)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    38
set (source ${source}
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    39
${sourcepath}us_evnt.cpp ${sourcepath}locmapping.cpp ${sourcepath}us_exec.cpp ${sourcepath}us_func.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    40
${sourcepath}us_graph.cpp ${sourcepath}us_hand.cpp ${sourcepath}us_ksvr.cpp ${sourcepath}us_des.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    41
${sourcepath}us_lex16.cpp ${sourcepath}us_lex8.cpp ${sourcepath}us_loc.cpp ${sourcepath}us_mes.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    42
${sourcepath}us_parse.cpp ${sourcepath}us_power.cpp ${sourcepath}us_property.cpp ${sourcepath}us_que.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    43
${sourcepath}us_ref.cpp ${sourcepath}us_regn.cpp ${sourcepath}us_test.cpp ${sourcepath}us_time.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    44
${sourcepath}us_trp.cpp ${sourcepath}us_utl.cpp ${sourcepath}us_mqueue.cpp ${sourcepath}us_encode.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    45
${sourcepath}us_decode.cpp ${sourcepath}us_secure.cpp ${sourcepath}us_htab.cpp ${sourcepath}us_rwlock.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    46
${sourcepath}us_shbuf.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    47
)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    48
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    49
#Adding the sources from common
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    50
set (sourcepath ./common/)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    51
set (source ${source}
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    52
${sourcepath}array.cpp ${sourcepath}des8.cpp ${sourcepath}des16.cpp ${sourcepath}alloc.cpp ${sourcepath}heap.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    53
${sourcepath}mem.cpp ${sourcepath}secure.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    54
)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    55
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    56
#Adding the sources from common/win32
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    57
set (sourcepath ./common/win32/)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    58
set (source ${source}
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    59
${sourcepath}atomics.cpp
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    60
)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    61
18
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    62
#Adding the sources from maths
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    63
set (sourcepath ./euser/maths/)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    64
set (source ${source}
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    65
${sourcepath}um_asin.cpp ${sourcepath}um_atan.cpp ${sourcepath}um_dtor.cpp ${sourcepath}um_exp.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    66
${sourcepath}um_frac.cpp ${sourcepath}um_int.cpp ${sourcepath}um_ln.cpp ${sourcepath}um_log.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    67
${sourcepath}um_mod.cpp ${sourcepath}um_pow.cpp ${sourcepath}um_pow10.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    68
${sourcepath}um_rand.cpp ${sourcepath}um_rtod.cpp ${sourcepath}um_sin.cpp ${sourcepath}um_spec.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    69
${sourcepath}um_sqrt.cpp ${sourcepath}um_tan.cpp ${sourcepath}um_utl.cpp
22
5c5219488d00 Fixing linkage error. First successful euser build.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 21
diff changeset
    70
./euser/epoc/win32/uc_i64.cpp
5c5219488d00 Fixing linkage error. First successful euser build.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 21
diff changeset
    71
./euser/epoc/win32/uc_dll.cpp
18
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    72
)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    73
22
5c5219488d00 Fixing linkage error. First successful euser build.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 21
diff changeset
    74
18
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    75
#Adding the sources from epoc/win32
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    76
set (sourcepath ./euser/epoc/win32/)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    77
set (source ${source}
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    78
${sourcepath}uc_i64.cpp ${sourcepath}uc_realx.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    79
${sourcepath}uc_trp.cpp ${sourcepath}uc_utl.cpp ${sourcepath}uc_exec.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    80
)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    81
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    82
#Adding the sources from epoc
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    83
set (sourcepath ./euser/epoc/)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    84
set (source ${source}
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    85
${sourcepath}up_lib.cpp ${sourcepath}up_utl.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    86
)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    87
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    88
#Adding the sources from unicode
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    89
set (sourcepath ./euser/unicode/)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    90
set (source ${source}
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    91
${sourcepath}collate.cpp ${sourcepath}unicode.cpp ${sourcepath}unitable.cpp ${sourcepath}Compare.cpp
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    92
)
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    93
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
    94
#define our library
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    95
add_library (emulator SHARED ./euser/epoc/win32/emulator.cpp)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    96
target_link_libraries(emulator kernel32)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    97
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    98
add_library (euser SHARED ${source})
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
    99
target_link_libraries(euser emulator)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   100
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   101
add_library (estub ./euser/epoc/win32/uc_stub.cpp)
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   102
22
5c5219488d00 Fixing linkage error. First successful euser build.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 21
diff changeset
   103
#No need for emulator here
5c5219488d00 Fixing linkage error. First successful euser build.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 21
diff changeset
   104
#add_executable(epoc ./euser/epoc/win32/uc_epoc.cpp)
5c5219488d00 Fixing linkage error. First successful euser build.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 21
diff changeset
   105
#target_link_libraries(epoc estub euser)
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   106
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   107
21
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   108
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   109
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   110
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   111
18
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
   112
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
   113
#define vs IDE folders
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
   114
source_group(Sources REGULAR_EXPRESSION ".+\\.cpp$")
1ff3ff4e270f Basic kernel cmake file. Not yet compiling.
Slion
parents:
diff changeset
   115
source_group(Includes REGULAR_EXPRESSION ".+\\.h$") 	
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   116
21
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   117
#Generate the exec enum using CMAKE custom command
19
f6d3d9676ee4 Trying to figure out how to implement my WINC like compatibility layer. Going the emulation way is probably not so smart. We should not use the kernel but rather hook native functions in the Exec calls.
Slion
parents: 18
diff changeset
   118
#perl genexec.pl -i execs.txt -e ../include/exec_enum.h -u ../include/exec_user.h -k ../include/exec_kernel.h
21
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   119
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   120
add_custom_command (
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   121
 	TARGET euser
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   122
   	PRE_BUILD
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   123
   	COMMAND perl ./kernel/genexec.pl -i ./kernel/execs.txt -e ./include/exec_enum.h -u ./include/exec_user.h -k ./include/exec_kernel.h
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   124
	WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} 	
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   125
   	COMMENT "Generating exec headers..."
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   126
   	VERBATIM
af091391d962 Adding support for exec enum generation using CMake custom command.
Stephane Lenclud <tortoisehg@lenclud.com>
parents: 19
diff changeset
   127
 	)