[CMAKE]
[reactos.git] / dll / win32 / pidgen / CMakeLists.txt
index 067beca..e175a58 100644 (file)
@@ -2,15 +2,21 @@
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 add_definitions(-D__WINESRC__)
 
-spec2def(pidgen ${CMAKE_CURRENT_SOURCE_DIR}/pidgen.spec ${CMAKE_CURRENT_BINARY_DIR}/pidgen.def)
+set_rc_compiler()
+spec2def(pidgen.dll pidgen.spec)
 
-add_library(pidgen SHARED main.c rsrc.rc)
+list(APPEND SOURCE
+    main.c
+    rsrc.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/pidgen_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/pidgen.def)
+
+add_library(pidgen SHARED ${SOURCE})
 
 set_module_type(pidgen win32dll)
 
-target_link_libraries(pidgen
-    ${CMAKE_CURRENT_BINARY_DIR}/pidgen.def
-    wine)
+target_link_libraries(pidgen wine)
+
+add_importlibs(pidgen msvcrt kernel32 ntdll)
 
-add_importlibs(pidgen kernel32 ntdll)
-add_dependencies(pidgen pidgen_def)
+add_cd_file(TARGET pidgen DESTINATION reactos/system32 FOR all)