Sync with trunk r58033.
[reactos.git] / dll / win32 / dbghelp / CMakeLists.txt
1
2 add_definitions(
3 -D__WINESRC__
4 -D_WINE
5 -DHAVE_REGEX_H
6 -DHAVE_ALLOCA_H
7 -D_IMAGEHLP_SOURCE_)
8
9 if(ARCH STREQUAL "amd64")
10 add_definitions(-DUNW_FLAG_NHANDLER=0 -DUNW_FLAG_EHANDLER=1 -DUNW_FLAG_UHANDLER=2 -DUNW_FLAG_CHAININFO=3)
11 endif()
12
13 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
14 spec2def(dbghelp.dll dbghelp.spec ADD_IMPORTLIB)
15
16 list(APPEND SOURCE
17 coff.c
18 cpu_arm.c
19 cpu_i386.c
20 cpu_ppc.c
21 cpu_sparc.c
22 cpu_x86_64.c
23 crc32.c
24 dbghelp.c
25 dwarf.c
26 elf_module.c
27 image.c
28 macho_module.c
29 minidump.c
30 module.c
31 msc.c
32 path.c
33 pe_module.c
34 rosstubs.c
35 source.c
36 stabs.c
37 stack.c
38 storage.c
39 symbol.c
40 type.c
41 regex.c
42 ${CMAKE_CURRENT_BINARY_DIR}/dbghelp_stubs.c
43 ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
44
45 add_library(dbghelp SHARED ${SOURCE} version.rc)
46
47 if(NOT MSVC)
48 # FIXME: http://www.cmake.org/Bug/view.php?id=12998
49 #allow_warnings(dbghelp)
50 set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error")
51 endif()
52
53 set_module_type(dbghelp win32dll)
54 target_link_libraries(dbghelp wine ${PSEH_LIB} oldnames)
55 add_delay_importlibs(dbghelp version)
56 add_importlibs(dbghelp psapi msvcrt kernel32 ntdll)
57 add_pch(dbghelp dbghelp_private.h)
58 add_cd_file(TARGET dbghelp DESTINATION reactos/system32 FOR all)