mirror of
https://github.com/reactos/reactos.git
synced 2024-06-30 18:01:07 +00:00
[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:
parent
b3ae8180d3
commit
e28e6935a6
|
@ -192,7 +192,7 @@ else()
|
||||||
set(SPEC2DEF_ARCH i386)
|
set(SPEC2DEF_ARCH i386)
|
||||||
endif()
|
endif()
|
||||||
function(spec2def _dllname _spec_file)
|
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(${ARGC} GREATER 2)
|
||||||
if(${ARGN} STREQUAL "ADD_IMPORTLIB")
|
if(${ARGN} STREQUAL "ADD_IMPORTLIB")
|
||||||
set(__add_importlib TRUE)
|
set(__add_importlib TRUE)
|
||||||
|
|
|
@ -39,6 +39,10 @@ add_asm_files(ntdll_asm ${ASM_SOURCE})
|
||||||
add_library(ntdll SHARED ${SOURCE} ${ntdll_asm})
|
add_library(ntdll SHARED ${SOURCE} ${ntdll_asm})
|
||||||
|
|
||||||
set_module_type(ntdll win32dll ENTRYPOINT 0)
|
set_module_type(ntdll win32dll ENTRYPOINT 0)
|
||||||
|
#############################################
|
||||||
|
## HACK FOR MSVC COMPILATION WITH win32dll ##
|
||||||
|
set_subsystem(ntdll console)
|
||||||
|
################# END HACK #################
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_target_link_flags(ntdll "/RELEASE")
|
add_target_link_flags(ntdll "/RELEASE")
|
||||||
|
|
|
@ -95,8 +95,15 @@ endif()
|
||||||
|
|
||||||
add_asm_files(kernel32_asm ${ASM_SOURCE})
|
add_asm_files(kernel32_asm ${ASM_SOURCE})
|
||||||
add_library(kernel32 SHARED ${SOURCE} ${kernel32_asm})
|
add_library(kernel32 SHARED ${SOURCE} ${kernel32_asm})
|
||||||
|
|
||||||
set_module_type(kernel32 win32dll ENTRYPOINT DllMain 12)
|
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})
|
target_link_libraries(kernel32 wine chkstk ${PSEH_LIB})
|
||||||
|
|
||||||
add_importlibs(kernel32 ntdll)
|
add_importlibs(kernel32 ntdll)
|
||||||
add_pch(kernel32 k32.h)
|
add_pch(kernel32 k32.h)
|
||||||
add_dependencies(kernel32 psdk errcodes asm)
|
add_dependencies(kernel32 psdk errcodes asm)
|
||||||
|
|
|
@ -14,12 +14,15 @@ list(APPEND SOURCE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/basesrv.def)
|
${CMAKE_CURRENT_BINARY_DIR}/basesrv.def)
|
||||||
|
|
||||||
add_library(basesrv SHARED ${SOURCE})
|
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})
|
target_link_libraries(basesrv ${PSEH_LIB})
|
||||||
|
|
||||||
set_module_type(basesrv nativedll) # win32dll
|
add_importlibs(basesrv csrsrv ntdll)
|
||||||
|
|
||||||
add_importlibs(basesrv ntdll csrsrv)
|
|
||||||
|
|
||||||
add_dependencies(basesrv bugcodes)
|
add_dependencies(basesrv bugcodes)
|
||||||
add_cd_file(TARGET basesrv DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET basesrv DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -16,11 +16,10 @@ list(APPEND SOURCE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def)
|
${CMAKE_CURRENT_BINARY_DIR}/csrsrv.def)
|
||||||
|
|
||||||
add_library(csrsrv SHARED ${SOURCE})
|
add_library(csrsrv SHARED ${SOURCE})
|
||||||
|
set_module_type(csrsrv nativedll)
|
||||||
|
|
||||||
target_link_libraries(csrsrv ${PSEH_LIB} smlib)
|
target_link_libraries(csrsrv ${PSEH_LIB} smlib)
|
||||||
|
|
||||||
set_module_type(csrsrv nativedll)
|
|
||||||
|
|
||||||
add_importlibs(csrsrv ntdll smdll)
|
add_importlibs(csrsrv ntdll smdll)
|
||||||
|
|
||||||
add_pch(csrsrv srv.h)
|
add_pch(csrsrv srv.h)
|
||||||
|
|
|
@ -4,9 +4,11 @@ include_directories(
|
||||||
${REACTOS_SOURCE_DIR}/include/reactos/subsys)
|
${REACTOS_SOURCE_DIR}/include/reactos/subsys)
|
||||||
|
|
||||||
add_executable(csrss csrss.c csrss.rc)
|
add_executable(csrss csrss.c csrss.rc)
|
||||||
|
|
||||||
set_module_type(csrss nativecui)
|
set_module_type(csrss nativecui)
|
||||||
|
|
||||||
target_link_libraries(csrss nt)
|
target_link_libraries(csrss nt)
|
||||||
add_importlibs(csrss ntdll csrsrv)
|
|
||||||
|
add_importlibs(csrss csrsrv ntdll)
|
||||||
|
|
||||||
add_dependencies(csrss psdk bugcodes)
|
add_dependencies(csrss psdk bugcodes)
|
||||||
add_cd_file(TARGET csrss DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET csrss DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -15,16 +15,19 @@ list(APPEND SOURCE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/winsrv.def)
|
${CMAKE_CURRENT_BINARY_DIR}/winsrv.def)
|
||||||
|
|
||||||
add_library(winsrv SHARED ${SOURCE})
|
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
|
# Add the components
|
||||||
target_link_libraries(winsrv consrv usersrv)
|
target_link_libraries(winsrv consrv usersrv)
|
||||||
# Add win32ksys because of NtUser...()
|
# 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_delay_importlibs(winsrv advapi32 gdi32 user32 ${CONSRV_DELAY_IMPORT_LIBS})
|
||||||
|
add_importlibs(winsrv csrsrv kernel32 ntdll ${CONSRV_IMPORT_LIBS})
|
||||||
add_importlibs(winsrv msvcrt kernel32 ntdll csrsrv ${CONSRV_IMPORT_LIBS})
|
|
||||||
add_delay_importlibs(winsrv user32 gdi32 advapi32 ${CONSRV_DELAY_IMPORT_LIBS})
|
|
||||||
|
|
||||||
add_dependencies(winsrv bugcodes)
|
add_dependencies(winsrv bugcodes)
|
||||||
add_cd_file(TARGET winsrv DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET winsrv DESTINATION reactos/system32 FOR all)
|
||||||
|
|
Loading…
Reference in a new issue