Move all temporary import libs to a single directory.
[reactos.git] / dll / win32 / dbghelp / CMakeLists.txt
1
2 set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES> -L${REACTOS_BINARY_DIR}/lib/3rdparty/mingw")
3
4 add_definitions(-D__WINESRC__)
5 add_definitions(-D_DLL -D__USE_CRTIMP)
6 add_definitions(-D_WINE)
7
8 add_definitions(-DHAVE_REGEX_H)
9 add_definitions(-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 spec2def(dbghelp ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.spec ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
18
19 add_library(dbghelp SHARED
20 coff.c
21 cpu_i386.c
22 cpu_ppc.c
23 cpu_x86_64.c
24 crc32.c
25 dbghelp.c
26 dwarf.c
27 elf_module.c
28 image.c
29 macho_module.c
30 minidump.c
31 module.c
32 msc.c
33 path.c
34 pe_module.c
35 regex.c
36 rosstubs.c
37 source.c
38 stabs.c
39 stack.c
40 storage.c
41 symbol.c
42 type.c
43 version.rc)
44
45 set_target_properties(dbghelp PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
46
47 target_link_libraries(dbghelp
48 ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def
49 wine
50 mingw_common
51 -lpsapi
52 -lversion
53 pseh
54 -lmsvcrt)
55
56 add_dependencies(dbghelp dbghelp_def psdk)