[CMAKE]
[reactos.git] / dll / win32 / bcrypt / CMakeLists.txt
index 17e157b..d618a81 100644 (file)
@@ -2,19 +2,20 @@
 add_definitions(-D__WINESRC__)
 include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
 
-spec2def(bcrypt ${CMAKE_CURRENT_SOURCE_DIR}/bcrypt.spec ${CMAKE_CURRENT_BINARY_DIR}/bcrypt.def)
+set_rc_compiler()
+spec2def(bcrypt.dll bcrypt.spec)
 
-add_library(bcrypt SHARED
+list(APPEND SOURCE
     bcrypt_main.c
-    version.rc)
+    version.rc
+    ${CMAKE_CURRENT_BINARY_DIR}/bcrypt_stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/bcrypt.def)
 
+add_library(bcrypt SHARED ${SOURCE})
 set_module_type(bcrypt win32dll)
 
-target_link_libraries(bcrypt
-    ${CMAKE_CURRENT_BINARY_DIR}/bcrypt.def
-    wine)
+target_link_libraries(bcrypt wine)
 
-add_importlibs(bcrypt kernel32 ntdll)
+add_importlibs(bcrypt msvcrt kernel32 ntdll)
 
-add_dependencies(bcrypt bcrypt_def)
-add_cab_target(bcrypt 1)
+add_cd_file(TARGET bcrypt DESTINATION reactos/system32 FOR all)