[CMAKE]
[reactos.git] / dll / win32 / dbghelp / CMakeLists.txt
1
2 add_definitions(
3 -D__WINESRC__
4 -D_DLL
5 -D__USE_CRTIMP
6 -D_WINE
7 -DHAVE_REGEX_H
8 -DHAVE_ALLOCA_H
9 -D_IMAGEHLP_SOURCE_)
10
11 if(ARCH MATCHES amd64)
12 add_definitions(-DUNW_FLAG_NHANDLER=0 -DUNW_FLAG_EHANDLER=1 -DUNW_FLAG_UHANDLER=2 -DUNW_FLAG_CHAININFO=3)
13 endif(ARCH MATCHES amd64)
14
15 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
16
17 set_rc_compiler()
18
19 spec2def(dbghelp.dll dbghelp.spec)
20
21 list(APPEND SOURCE
22 coff.c
23 cpu_i386.c
24 cpu_ppc.c
25 cpu_x86_64.c
26 crc32.c
27 dbghelp.c
28 dwarf.c
29 elf_module.c
30 image.c
31 macho_module.c
32 minidump.c
33 module.c
34 msc.c
35 path.c
36 pe_module.c
37 regex.c
38 rosstubs.c
39 source.c
40 stabs.c
41 stack.c
42 storage.c
43 symbol.c
44 type.c
45 version.rc
46 ${CMAKE_CURRENT_BINARY_DIR}/dbghelp_stubs.c
47 ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
48
49 add_library(dbghelp SHARED ${SOURCE})
50
51 set_module_type(dbghelp win32dll)
52
53 target_link_libraries(dbghelp
54 wine
55 ${PSEH_LIB}
56 oldnames)
57
58 add_importlibs(dbghelp psapi version msvcrt kernel32 ntdll)
59 add_importlib_target(dbghelp.spec)
60 add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all)