|
1 # Copyright (c) 2009 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 project (euser) |
|
13 |
|
14 cmake_minimum_required(VERSION 2.6) |
|
15 |
|
16 #Add the given source files to our source prepending the sourcepath |
|
17 macro(add_source) |
|
18 foreach(mySource ${ARGV}) |
|
19 string(REGEX REPLACE "(^.+)" "${sourcepath}\\1" newsource ${mySource}) |
|
20 set(source ${source} ${newsource}) |
|
21 endforeach(mySource) |
|
22 endmacro(add_source) |
|
23 |
|
24 #add_definitions(-DUNICODE) |
|
25 add_definitions(-D__VC32__) |
|
26 add_definitions(-D_UNICODE) |
|
27 add_definitions(-D__LEAVE_EQUALS_THROW__) |
|
28 add_definitions(-D__WINS__) |
|
29 #__CPU_X86 is declared by __WINS__ |
|
30 #add_definitions(-D__CPU_X86) |
|
31 add_definitions(-D__DLL__) |
|
32 |
|
33 include_directories (../euser ../euser/unicode ../include |
|
34 ../include/nkern ../include/nkern/win32 ../include/kernel ../include/kernel/win32 ../include/memmodel/emul/win32 ../include/memmodel/emul) |
|
35 |
|
36 |
|
37 #Adding the sources from cbase |
|
38 set (sourcepath ../euser/cbase/) |
|
39 add_source( |
|
40 ub_act.cpp ub_array.cpp ub_bma.cpp ub_buf.cpp |
|
41 ub_circ.cpp ub_cln.cpp ub_cons.cpp ub_dtim.cpp |
|
42 ub_obj.cpp ub_svr.cpp ub_polsvr.cpp |
|
43 ub_tim.cpp ub_utl.cpp ub_tque.cpp |
|
44 ) |
|
45 |
|
46 |
|
47 #Add euser sources |
|
48 set (sourcepath ../euser/) |
|
49 add_source( |
|
50 us_evnt.cpp locmapping.cpp us_exec.cpp us_func.cpp |
|
51 us_graph.cpp us_hand.cpp us_ksvr.cpp us_des.cpp |
|
52 us_lex16.cpp us_lex8.cpp us_loc.cpp us_mes.cpp |
|
53 us_parse.cpp us_power.cpp us_property.cpp us_que.cpp |
|
54 us_ref.cpp us_regn.cpp us_test.cpp us_time.cpp |
|
55 us_trp.cpp us_utl.cpp us_mqueue.cpp us_encode.cpp |
|
56 us_decode.cpp us_secure.cpp us_htab.cpp us_rwlock.cpp |
|
57 us_shbuf.cpp |
|
58 ) |
|
59 |
|
60 |
|
61 #Adding the sources from common |
|
62 set (sourcepath ../common/) |
|
63 add_source( |
|
64 array.cpp des8.cpp des16.cpp alloc.cpp heap.cpp |
|
65 mem.cpp secure.cpp |
|
66 ) |
|
67 |
|
68 #Adding the sources from common/win32 |
|
69 set (sourcepath ../common/win32/) |
|
70 add_source( |
|
71 atomics.cpp |
|
72 ) |
|
73 |
|
74 #Adding the sources from maths |
|
75 set (sourcepath ../euser/maths/) |
|
76 add_source( |
|
77 um_asin.cpp um_atan.cpp um_dtor.cpp um_exp.cpp |
|
78 um_frac.cpp um_int.cpp um_ln.cpp um_log.cpp |
|
79 um_mod.cpp um_pow.cpp um_pow10.cpp |
|
80 um_rand.cpp um_rtod.cpp um_sin.cpp um_spec.cpp |
|
81 um_sqrt.cpp um_tan.cpp um_utl.cpp |
|
82 ) |
|
83 |
|
84 |
|
85 #Adding the sources from epoc/win32 |
|
86 set (sourcepath ../euser/epoc/win32/) |
|
87 add_source( |
|
88 uc_i64.cpp uc_realx.cpp |
|
89 uc_trp.cpp uc_utl.cpp uc_exec.cpp |
|
90 uc_dll.cpp |
|
91 ) |
|
92 |
|
93 #Adding the sources from epoc |
|
94 set (sourcepath ../euser/epoc/) |
|
95 add_source( |
|
96 up_lib.cpp up_utl.cpp |
|
97 ) |
|
98 |
|
99 #Adding the sources from unicode |
|
100 set (sourcepath ../euser/unicode/) |
|
101 add_source( |
|
102 collate.cpp unicode.cpp unitable.cpp Compare.cpp |
|
103 ) |
|
104 |
|
105 #define our library |
|
106 add_library (emulator SHARED ../euser/epoc/win32/emulator.cpp) |
|
107 target_link_libraries(emulator kernel32) |
|
108 |
|
109 add_library (euser SHARED ${source}) |
|
110 add_dependencies(euser genexec emulator) |
|
111 |
|
112 add_library (estub ../euser/epoc/win32/uc_stub.cpp) |
|
113 |
|
114 #define vs IDE folders |
|
115 source_group(Sources REGULAR_EXPRESSION ".+\\.cpp$") |
|
116 source_group(Includes REGULAR_EXPRESSION ".+\\.h$") |
|
117 |
|
118 |