[CMAKE]: Fix a comment typo only.
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 1 Sep 2013 00:11:56 +0000 (00:11 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 1 Sep 2013 00:11:56 +0000 (00:11 +0000)
[NTDLL-KERNEL32-BASESRV-WINSRV]: Specify by hand (hackz for MSVC builds) that the dll will be a "Console DLL" (ie. not a native one nor a Gui DLL).
[BASESRV]: Explicitely set the DLL entry point to DllMain (unusued).
[WINSRV]: Explicitely set the DLL entry point to DllMain (unusued) AND REMOVE usage of msvcrt (that might pose problems when testing with Windows msvcrt etc...) and use libcntpr instead.

Thanks to Amine for having helped me in solving a problem with delayed imports.

svn path=/trunk/; revision=59933

reactos/cmake/msvc.cmake
reactos/dll/ntdll/CMakeLists.txt
reactos/dll/win32/kernel32/CMakeLists.txt
reactos/subsystems/win/basesrv/CMakeLists.txt
reactos/subsystems/win32/csrsrv/CMakeLists.txt
reactos/subsystems/win32/csrss/CMakeLists.txt
reactos/win32ss/user/winsrv/CMakeLists.txt

index 6deb5c3..edbbf18 100644 (file)
@@ -192,7 +192,7 @@ else()
     set(SPEC2DEF_ARCH i386)
 endif()
 function(spec2def _dllname _spec_file)
-    # do we also want to add impotlib targets?
+    # do we also want to add importlib targets?
     if(${ARGC} GREATER 2)
         if(${ARGN} STREQUAL "ADD_IMPORTLIB")
             set(__add_importlib TRUE)
index 7ad8547..83e9999 100644 (file)
@@ -39,6 +39,10 @@ add_asm_files(ntdll_asm ${ASM_SOURCE})
 add_library(ntdll SHARED ${SOURCE} ${ntdll_asm})
 
 set_module_type(ntdll win32dll ENTRYPOINT 0)
+#############################################
+## HACK FOR MSVC COMPILATION WITH win32dll ##
+set_subsystem(ntdll console)
+################# END  HACK #################
 
 if(MSVC)
     add_target_link_flags(ntdll "/RELEASE")
index 02e5547..7b6ff87 100644 (file)
@@ -95,8 +95,15 @@ endif()
 
 add_asm_files(kernel32_asm ${ASM_SOURCE})
 add_library(kernel32 SHARED ${SOURCE} ${kernel32_asm})
+
 set_module_type(kernel32 win32dll ENTRYPOINT DllMain 12)
+#############################################
+## HACK FOR MSVC COMPILATION WITH win32dll ##
+set_subsystem(kernel32 console)
+################# END  HACK #################
+
 target_link_libraries(kernel32 wine chkstk ${PSEH_LIB})
+
 add_importlibs(kernel32 ntdll)
 add_pch(kernel32 k32.h)
 add_dependencies(kernel32 psdk errcodes asm)
index 8434089..efa2872 100644 (file)
@@ -14,12 +14,15 @@ list(APPEND SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/basesrv.def)
 
 add_library(basesrv SHARED ${SOURCE})
+set_module_type(basesrv win32dll UNICODE ENTRYPOINT DllMain 12)
+#############################################
+## HACK FOR MSVC COMPILATION WITH win32dll ##
+set_subsystem(basesrv console)
+################# END  HACK #################
 
 target_link_libraries(basesrv ${PSEH_LIB})
 
-set_module_type(basesrv nativedll) # win32dll
-
-add_importlibs(basesrv ntdll csrsrv)
+add_importlibs(basesrv csrsrv ntdll)
 
 add_dependencies(basesrv bugcodes)
 add_cd_file(TARGET basesrv DESTINATION reactos/system32 FOR all)
index 62a864a..839f39a 100644 (file)
@@ -16,11 +16,10 @@ list(APPEND SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def)
 
 add_library(csrsrv SHARED ${SOURCE})
+set_module_type(csrsrv nativedll)
 
 target_link_libraries(csrsrv ${PSEH_LIB} smlib)
 
-set_module_type(csrsrv nativedll)
-
 add_importlibs(csrsrv ntdll smdll)
 
 add_pch(csrsrv srv.h)
index 869461f..8642dce 100644 (file)
@@ -4,9 +4,11 @@ include_directories(
     ${REACTOS_SOURCE_DIR}/include/reactos/subsys)
 
 add_executable(csrss csrss.c csrss.rc)
-
 set_module_type(csrss nativecui)
+
 target_link_libraries(csrss nt)
-add_importlibs(csrss ntdll csrsrv)
+
+add_importlibs(csrss csrsrv ntdll)
+
 add_dependencies(csrss psdk bugcodes)
 add_cd_file(TARGET csrss DESTINATION reactos/system32 FOR all)
index 15becac..e18461b 100644 (file)
@@ -15,16 +15,19 @@ list(APPEND SOURCE
     ${CMAKE_CURRENT_BINARY_DIR}/winsrv.def)
 
 add_library(winsrv SHARED ${SOURCE})
+set_module_type(winsrv win32dll UNICODE ENTRYPOINT DllMain 12)
+#############################################
+## HACK FOR MSVC COMPILATION WITH win32dll ##
+set_subsystem(winsrv console)
+################# END  HACK #################
 
 # Add the components
 target_link_libraries(winsrv consrv usersrv)
 # Add win32ksys because of NtUser...()
-target_link_libraries(winsrv win32ksys ${PSEH_LIB} ${CONSRV_TARGET_LINK_LIBS})
+target_link_libraries(winsrv win32ksys libcntpr ${PSEH_LIB} ${CONSRV_TARGET_LINK_LIBS})
 
-set_module_type(winsrv win32dll UNICODE)
-
-add_importlibs(winsrv msvcrt kernel32 ntdll csrsrv ${CONSRV_IMPORT_LIBS})
-add_delay_importlibs(winsrv user32 gdi32 advapi32 ${CONSRV_DELAY_IMPORT_LIBS})
+add_delay_importlibs(winsrv advapi32 gdi32 user32 ${CONSRV_DELAY_IMPORT_LIBS})
+add_importlibs(winsrv csrsrv kernel32 ntdll ${CONSRV_IMPORT_LIBS})
 
 add_dependencies(winsrv bugcodes)
 add_cd_file(TARGET winsrv DESTINATION reactos/system32 FOR all)