- Update to r53061
[reactos.git] / dll / win32 / msvcrt20 / CMakeLists.txt
index fb3bc51..db4d235 100644 (file)
@@ -1,20 +1,34 @@
 
-include_directories(${REACTOS_SOURCE_DIR}/include/reactos/wine)
+add_definitions(
+    -DUSE_MSVCRT_PREFIX
+    -D_MSVCRT_
+    -D_MSVCRT_LIB_
+    -D_MT
+    -D_CTYPE_DISABLE_MACROS
+    -D_NO_INLINING
+    -DCRTDLL
+    -D__MINGW_IMPORT="")
 
-add_definitions(-D__WINESRC__)
-add_definitions(-DCRTDLL)
+include_directories(${REACTOS_SOURCE_DIR}/lib/sdk/crt/include)
 
 spec2def(msvcrt20.dll msvcrt20.spec)
 
 list(APPEND SOURCE
     msvcrt20.c
+    stubs.c
+    ${CMAKE_CURRENT_BINARY_DIR}/msvcrt20_stubs.c
     ${CMAKE_CURRENT_BINARY_DIR}/msvcrt20.def)
 
 add_library(msvcrt20 SHARED ${SOURCE})
-set_entrypoint(msvcrt20 0)
+set_entrypoint(msvcrt20 DllMain@12)
+set_image_base(msvcrt20 ${baseaddress_msvcrt20})
 
-target_link_libraries(msvcrt20 wine)
+target_link_libraries(msvcrt20 crt wine)
 
-add_importlibs(msvcrt20 msvcrt kernel32 ntdll)
+if(NOT MSVC)
+  target_link_libraries(msvcrt20 pseh)
+endif()
+
+add_importlibs(msvcrt20 kernel32 ntdll)
 add_dependencies(msvcrt20 psdk)
 add_cd_file(TARGET msvcrt20 DESTINATION reactos/system32 FOR all)