kernel/eka/euser/CMakeLists.txt
author Slion
Wed, 06 Jan 2010 20:35:57 +0100
branchanywhere
changeset 24 18d195b75193
child 25 57330c35d3d7
permissions -rw-r--r--
Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
24
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     1
# Copyright (c) 2009 Stéphane Lenclud.
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     2
# All rights reserved.
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     3
# This component and the accompanying materials are made available
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     5
# which accompanies this distribution, and is available
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     7
#
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     8
# Initial Contributors:
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
     9
# Stéphane Lenclud.
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    10
#
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    11
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    12
project (euser)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    13
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    14
cmake_minimum_required(VERSION 2.6)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    15
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    16
#Add the given source files to our source prepending the sourcepath
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    17
macro(add_source)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    18
	foreach(mySource ${ARGV})
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    19
		string(REGEX REPLACE "(^.+)" "${sourcepath}\\1" newsource ${mySource})
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    20
		set(source ${source} ${newsource})
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    21
	endforeach(mySource) 
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    22
endmacro(add_source) 
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    23
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    24
#add_definitions(-DUNICODE)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    25
add_definitions(-D__VC32__)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    26
add_definitions(-D_UNICODE)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    27
add_definitions(-D__LEAVE_EQUALS_THROW__)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    28
add_definitions(-D__WINS__)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    29
#__CPU_X86 is declared by __WINS__ 
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    30
#add_definitions(-D__CPU_X86)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    31
add_definitions(-D__DLL__)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    32
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    33
include_directories (../euser ../euser/unicode ../include 
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    34
../include/nkern ../include/nkern/win32 ../include/kernel ../include/kernel/win32 ../include/memmodel/emul/win32 ../include/memmodel/emul)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    35
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    36
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    37
#Adding the sources from cbase
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    38
set (sourcepath ../euser/cbase/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    39
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    40
ub_act.cpp ub_array.cpp ub_bma.cpp ub_buf.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    41
ub_circ.cpp ub_cln.cpp ub_cons.cpp ub_dtim.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    42
ub_obj.cpp ub_svr.cpp ub_polsvr.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    43
ub_tim.cpp ub_utl.cpp ub_tque.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    44
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    45
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    46
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    47
#Add euser sources
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    48
set (sourcepath ../euser/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    49
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    50
us_evnt.cpp locmapping.cpp us_exec.cpp us_func.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    51
us_graph.cpp us_hand.cpp us_ksvr.cpp us_des.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    52
us_lex16.cpp us_lex8.cpp us_loc.cpp us_mes.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    53
us_parse.cpp us_power.cpp us_property.cpp us_que.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    54
us_ref.cpp us_regn.cpp us_test.cpp us_time.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    55
us_trp.cpp us_utl.cpp us_mqueue.cpp us_encode.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    56
us_decode.cpp us_secure.cpp us_htab.cpp us_rwlock.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    57
us_shbuf.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    58
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    59
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    60
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    61
#Adding the sources from common
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    62
set (sourcepath ../common/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    63
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    64
array.cpp des8.cpp des16.cpp alloc.cpp heap.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    65
mem.cpp secure.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    66
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    67
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    68
#Adding the sources from common/win32
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    69
set (sourcepath ../common/win32/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    70
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    71
atomics.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    72
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    73
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    74
#Adding the sources from maths
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    75
set (sourcepath ../euser/maths/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    76
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    77
um_asin.cpp um_atan.cpp um_dtor.cpp um_exp.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    78
um_frac.cpp um_int.cpp um_ln.cpp um_log.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    79
um_mod.cpp um_pow.cpp um_pow10.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    80
um_rand.cpp um_rtod.cpp um_sin.cpp um_spec.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    81
um_sqrt.cpp um_tan.cpp um_utl.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    82
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    83
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    84
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    85
#Adding the sources from epoc/win32
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    86
set (sourcepath ../euser/epoc/win32/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    87
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    88
uc_i64.cpp uc_realx.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    89
uc_trp.cpp uc_utl.cpp uc_exec.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    90
uc_dll.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    91
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    92
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    93
#Adding the sources from epoc
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    94
set (sourcepath ../euser/epoc/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    95
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    96
up_lib.cpp up_utl.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    97
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    98
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
    99
#Adding the sources from unicode
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   100
set (sourcepath ../euser/unicode/)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   101
add_source(
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   102
collate.cpp unicode.cpp unitable.cpp Compare.cpp
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   103
)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   104
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   105
#define our library
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   106
add_library (emulator SHARED ../euser/epoc/win32/emulator.cpp)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   107
target_link_libraries(emulator kernel32)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   108
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   109
add_library (euser SHARED ${source})
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   110
add_dependencies(euser genexec emulator)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   111
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   112
add_library (estub ../euser/epoc/win32/uc_stub.cpp)
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   113
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   114
#define vs IDE folders
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   115
source_group(Sources REGULAR_EXPRESSION ".+\\.cpp$")
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   116
source_group(Includes REGULAR_EXPRESSION ".+\\.h$") 	
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   117
18d195b75193 Created separate CMakeLists.txt for euser and ekern to easily build them with different compiler definitions. Ekern now building as a DLL.
Slion
parents:
diff changeset
   118