[CMAKE]
[reactos.git] / dll / win32 / icmp / CMakeLists.txt
index 0b3f0c2..cd940ba 100644 (file)
@@ -1,18 +1,21 @@
 
-
-
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-spec2def(icmp ${CMAKE_CURRENT_SOURCE_DIR}/icmp.spec ${CMAKE_CURRENT_BINARY_DIR}/icmp.def)
+set_rc_compiler()
+
+spec2def(icmp.dll icmp.spec)
 
-add_library(icmp SHARED icmp_main.c icmp.rc)
+list(APPEND SOURCE
+    icmp_main.c
+    icmp.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/icmp_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/icmp.def)
 
-set_target_properties(icmp PROPERTIES LINK_FLAGS "-Wl,-entry,_DllMain@12")
+add_library(icmp SHARED ${SOURCE})
 
-target_link_libraries(icmp
-    ${CMAKE_CURRENT_BINARY_DIR}/icmp.def
-    wine
-    -lws2_32
-    mingw_common)
+set_module_type(icmp win32dll)
 
-add_dependencies(icmp icmp_def psdk)
+target_link_libraries(icmp wine)
+add_importlibs(icmp ws2_32 msvcrt kernel32 ntdll)
+add_importlib_target(icmp.spec)
+add_cd_file(TARGET icmp DESTINATION reactos/system32)