Add a fourth parameter to the DEFINE_DACVAR macro that is the actual fully qualified...
[platform/upstream/coreclr.git] / src / pal / src / CMakeLists.txt
1 cmake_minimum_required(VERSION 2.8.12.2)
2
3 include(configure.cmake)
4
5 project(CoreClrPal)
6
7 set(CMAKE_INCLUDE_CURRENT_DIR ON)
8
9 # Include directories
10
11 include_directories(include)
12
13 # Compile options
14
15 if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
16   add_definitions(-D_TARGET_MAC64)
17   set(PLATFORM_SOURCES
18     arch/i386/context.S
19     arch/i386/dispatchexceptionwrapper.S
20     exception/machexception.cpp
21     exception/machmessage.cpp
22   )
23 endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
24
25 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
26   add_definitions(-D__LINUX__=1)
27 endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
28
29 add_definitions(-DPLATFORM_UNIX=1)
30 add_definitions(-DLP64COMPATIBLE=1)
31 add_definitions(-DFEATURE_PAL=1)
32 add_definitions(-DCORECLR=1)
33 add_definitions(-DPIC=1)
34 add_definitions(-DBIT64=1)
35 add_definitions(-D_WIN64=1)
36
37 add_compile_options(-fno-builtin)
38 add_compile_options(-fPIC)
39
40 set(SOURCES
41   arch/i386/context.cpp
42   arch/i386/context2.S
43   arch/i386/processor.cpp
44   cruntime/file.cpp
45   cruntime/filecrt.cpp
46   cruntime/finite.cpp
47   cruntime/lstr.cpp
48   cruntime/malloc.cpp
49   cruntime/mbstring.cpp
50   cruntime/misc.cpp
51   cruntime/misctls.cpp
52   cruntime/path.cpp
53   cruntime/printf.cpp
54   cruntime/printfcpp.cpp
55   cruntime/silent_printf.cpp
56   cruntime/string.cpp
57   cruntime/stringtls.cpp
58   cruntime/thread.cpp
59   cruntime/wchar.cpp
60   cruntime/wchartls.cpp
61   debug/debug.cpp
62   exception/console.cpp
63   exception/seh.cpp
64   exception/signal.cpp
65   file/directory.cpp
66   file/disk.cpp
67   file/file.cpp
68   file/filetime.cpp
69   file/find.cpp
70   file/path.cpp
71   file/shmfilelockmgr.cpp
72   handlemgr/handleapi.cpp
73   handlemgr/handlemgr.cpp
74   init/pal.cpp
75   init/sxs.cpp
76   loader/module.cpp
77   loader/modulename.cpp
78   locale/unicode.cpp
79   locale/unicode_data.cpp
80   locale/utf8.cpp
81   map/common.cpp
82   map/map.cpp
83   map/virtual.cpp
84   memory/heap.cpp
85   memory/local.cpp
86   misc/dbgmsg.cpp
87   misc/environ.cpp
88   misc/error.cpp
89   misc/fmtmessage.cpp
90   misc/interlock.cpp
91   misc/miscpalapi.cpp
92   misc/dactableaddress.cpp
93   misc/strutil.cpp
94   misc/sysinfo.cpp
95   misc/time.cpp
96   misc/utils.cpp
97   misc/version.cpp
98   objmgr/palobjbase.cpp
99   objmgr/shmobject.cpp
100   objmgr/shmobjectmanager.cpp
101   safecrt/makepath_s.c
102   safecrt/memcpy_s.c
103   safecrt/memmove_s.c
104   safecrt/mbusafecrt.c
105   safecrt/safecrt_input_s.c
106   safecrt/safecrt_output_l.c
107   safecrt/safecrt_output_s.c
108   safecrt/safecrt_winput_s.c
109   safecrt/safecrt_woutput_s.c
110   safecrt/splitpath_s.c
111   safecrt/sprintf.c
112   safecrt/sscanf.c
113   safecrt/strcat_s.c
114   safecrt/strcpy_s.c
115   safecrt/strlen_s.c
116   safecrt/strncat_s.c
117   safecrt/strncpy_s.c
118   safecrt/strtok_s.c
119   safecrt/swprintf.c
120   safecrt/vsprintf.c
121   safecrt/vswprint.c
122   safecrt/wcscat_s.c
123   safecrt/wcscpy_s.c
124   safecrt/wcslen_s.c
125   safecrt/wcsncat_s.c
126   safecrt/wcsncpy_s.c
127   safecrt/wcstok_s.c
128   safecrt/wmakepath_s.c
129   safecrt/wsplitpath_s.c
130   safecrt/xtoa_s.c
131   safecrt/xtow_s.c
132   shmemory/shmemory.cpp
133   sync/cs.cpp
134   synchobj/event.cpp
135   synchobj/semaphore.cpp
136   synchobj/mutex.cpp
137   synchmgr/synchcontrollers.cpp
138   synchmgr/synchmanager.cpp
139   synchmgr/wait.cpp
140   thread/process.cpp
141   thread/thread.cpp
142   thread/threadsusp.cpp
143   thread/tls.cpp
144 )
145
146 add_library(CoreClrPal
147   STATIC
148   ${SOURCES}
149   ${PLATFORM_SOURCES}
150 )
151
152 if(CMAKE_SYSTEM_NAME STREQUAL Linux)
153 target_link_libraries(CoreClrPal
154   pthread
155   rt
156   dl
157   unwind
158 )
159 endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
160
161 if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
162   find_library(COREFOUNDATION CoreFoundation)
163   find_library(CORESERVICES CoreServices)
164   find_library(SECURITY Security)
165   find_library(SYSTEM System)
166   target_link_libraries(CoreClrPal
167     ${COREFOUNDATION}
168     ${CORESERVICES}
169     ${SECURITY}
170     ${SYSTEM}
171   )
172 endif(CMAKE_SYSTEM_NAME STREQUAL Darwin)
173
174 add_subdirectory(examples)