[CMAKE]: Fix a comment typo only.

[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
This commit is contained in:
Hermès Bélusca-Maïto 2013-09-01 00:11:56 +00:00
parent b3ae8180d3
commit e28e6935a6
7 changed files with 31 additions and 13 deletions

View 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)

View 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")

View 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)

View 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)

View 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)

View 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)

View 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)