[3RDPARTY] Make some warnings non-fatal
[reactos.git] / dll / win32 / crypt32 / CMakeLists.txt
index 22e772d..b00ef45 100644 (file)
@@ -1,16 +1,19 @@
 
+remove_definitions(-D_WIN32_WINNT=0x502 -DWINVER=0x502)
+add_definitions(-D_WIN32_WINNT=0x600 -DWINVER=0x600)
+
 add_definitions(
     -D__WINESRC__
-    -D_WINE)
-
-remove_definitions(-D_WIN32_WINNT=0x502)
-add_definitions(-D_WIN32_WINNT=0x600)
+    -D_WINE
+    -D_CRYPT32_)
 
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
+include_directories(${REACTOS_SOURCE_DIR}/sdk/include/reactos/wine)
+spec2def(crypt32.dll crypt32.spec ADD_IMPORTLIB)
 
-set_rc_compiler()
-
-spec2def(crypt32.dll crypt32.spec)
+if(MSVC)
+    # error C4312: 'type cast': conversion from 'unsigned int' to 'void *' of greater size
+    replace_compile_flags("/we4312" " ")
+endif()
 
 list(APPEND SOURCE
     base64.c
@@ -37,19 +40,17 @@ list(APPEND SOURCE
     sip.c
     store.c
     str.c
+    precomp.h)
+
+add_library(crypt32 MODULE
+    ${SOURCE}
     crypt32.rc
     ${CMAKE_CURRENT_BINARY_DIR}/crypt32_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/crypt32.def)
 
-add_library(crypt32 SHARED ${SOURCE})
-
 set_module_type(crypt32 win32dll)
-
-target_link_libraries(crypt32
-    wine
-    ${PSEH_LIB}
-    oldnames)
-
-add_importlibs(crypt32 user32 advapi32 msvcrt kernel32 ntdll)
+target_link_libraries(crypt32 wine ${PSEH_LIB} oldnames)
+add_delay_importlibs(crypt32 cryptnet)
+add_importlibs(crypt32 bcrypt user32 advapi32 advapi32_vista msvcrt kernel32 ntdll)
+add_pch(crypt32 precomp.h SOURCE)
 add_cd_file(TARGET crypt32 DESTINATION reactos/system32 FOR all)
-add_importlib_target(crypt32.spec)