[CMAKE]
[reactos.git] / dll / win32 / dbghelp / CMakeLists.txt
index d50fd5e..bea240c 100644 (file)
@@ -1,12 +1,11 @@
 
-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")
-
-add_definitions(-D__WINESRC__)
-add_definitions(-D_DLL -D__USE_CRTIMP)
-add_definitions(-D_WINE)
-
-add_definitions(-DHAVE_REGEX_H)
-add_definitions(-D_IMAGEHLP_SOURCE_)
+add_definitions(
+    -D__WINESRC__
+    -D_DLL
+    -D__USE_CRTIMP
+    -D_WINE
+    -DHAVE_REGEX_H
+    -D_IMAGEHLP_SOURCE_)
 
 if(ARCH MATCHES amd64)
 add_definitions(-DUNW_FLAG_NHANDLER=0 -DUNW_FLAG_EHANDLER=1 -DUNW_FLAG_UHANDLER=2 -DUNW_FLAG_CHAININFO=3)
@@ -14,7 +13,7 @@ endif(ARCH MATCHES amd64)
 
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-spec2def(dbghelp ${CMAKE_CURRENT_SOURCE_DIR}/dbghelp.spec ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
+spec2def(dbghelp.dll dbghelp.spec)
 
 add_library(dbghelp SHARED
     coff.c
@@ -40,17 +39,16 @@ add_library(dbghelp SHARED
     storage.c
     symbol.c
     type.c
-    version.rc)
+    version.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def)
 
-set_target_properties(dbghelp PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+set_module_type(dbghelp win32dll)
 
 target_link_libraries(dbghelp
-    ${CMAKE_CURRENT_BINARY_DIR}/dbghelp.def
     wine
-    mingw_common
-    -lpsapi
-    -lversion
     pseh
-    -lmsvcrt)
+    oldnames)
+
+add_importlibs(dbghelp psapi version msvcrt kernel32 ntdll)
 
-add_dependencies(dbghelp dbghelp_def psdk)
+add_cab_target(dbghelp 1)