mirror of
https://github.com/reactos/reactos.git
synced 2025-04-05 21:21:33 +00:00
[CMAKE]
* Add the wdmdriver module type svn path=/trunk/; revision=58637
This commit is contained in:
parent
1cac15db4b
commit
4f6ab684bf
3 changed files with 10 additions and 5 deletions
|
@ -299,7 +299,7 @@ function(set_module_type MODULE TYPE)
|
|||
|
||||
# Set subsystem. Also take this as an occasion
|
||||
# to error out if someone gave a non existing type
|
||||
if((${TYPE} STREQUAL nativecui) OR (${TYPE} STREQUAL nativedll) OR (${TYPE} STREQUAL kernelmodedriver))
|
||||
if((${TYPE} STREQUAL nativecui) OR (${TYPE} STREQUAL nativedll) OR (${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
|
||||
set(__subsystem native)
|
||||
elseif(${TYPE} STREQUAL win32cui)
|
||||
set(__subsystem console)
|
||||
|
@ -342,7 +342,7 @@ function(set_module_type MODULE TYPE)
|
|||
OR (${TYPE} STREQUAL cpl))
|
||||
set(__entrypoint DllMainCRTStartup)
|
||||
set(__entrystack 12)
|
||||
elseif(${TYPE} STREQUAL kernelmodedriver)
|
||||
elseif((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
|
||||
set(__entrypoint DriverEntry)
|
||||
set(__entrystack 8)
|
||||
elseif(${TYPE} STREQUAL nativedll)
|
||||
|
@ -369,12 +369,12 @@ function(set_module_type MODULE TYPE)
|
|||
else()
|
||||
message(STATUS "${MODULE} has no base address")
|
||||
endif()
|
||||
elseif(${TYPE} STREQUAL kernelmodedriver)
|
||||
elseif((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
|
||||
set_image_base(${MODULE} 0x00010000)
|
||||
endif()
|
||||
|
||||
# Now do some stuff which is specific to each type
|
||||
if(${TYPE} STREQUAL kernelmodedriver)
|
||||
if((${TYPE} STREQUAL kernelmodedriver) OR (${TYPE} STREQUAL wdmdriver))
|
||||
add_dependencies(${MODULE} bugcodes)
|
||||
set_target_properties(${MODULE} PROPERTIES SUFFIX ".sys")
|
||||
endif()
|
||||
|
|
|
@ -202,8 +202,11 @@ function(set_module_type_toolchain MODULE TYPE)
|
|||
target_link_libraries(${MODULE} -lstdc++ -lsupc++ -lgcc -lmingwex)
|
||||
endif()
|
||||
|
||||
if(${TYPE} STREQUAL "kernelmodedriver")
|
||||
if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver"))
|
||||
add_target_link_flags(${MODULE} "-Wl,--exclude-all-symbols,-file-alignment=0x1000,-section-alignment=0x1000")
|
||||
if(${TYPE} STREQUAL "wdmdriver")
|
||||
add_target_link_flags(${MODULE} "-Wl,--wdmdriver")
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
|
|
@ -112,6 +112,8 @@ function(set_module_type_toolchain MODULE TYPE)
|
|||
add_target_link_flags(${MODULE} "/DLL")
|
||||
elseif(${TYPE} STREQUAL "kernelmodedriver")
|
||||
add_target_link_flags(${MODULE} "/DRIVER")
|
||||
elseif(${TYPE} STREQUAL "wdmdriver")
|
||||
add_target_link_flags(${MODULE} "/DRIVER:WDM")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
|
Loading…
Reference in a new issue