mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 22:32:58 +00:00
[CMAKE]: Correctly set valid PE image version numbers for the OS subsystem (GCC builds), and image and OS version numbers from the NT OS version ReactOS is based on.
svn path=/trunk/; revision=75333
This commit is contained in:
parent
899d12e786
commit
00d7ab957b
2 changed files with 13 additions and 5 deletions
|
@ -581,12 +581,20 @@ function(set_module_type MODULE TYPE)
|
||||||
set_subsystem(${MODULE} ${__subsystem})
|
set_subsystem(${MODULE} ${__subsystem})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#set unicode definitions
|
# Set the PE image version numbers from the NT OS version ReactOS is based on
|
||||||
|
if (MSVC)
|
||||||
|
add_target_link_flags(${MODULE} "/VERSION:5.01")
|
||||||
|
else()
|
||||||
|
add_target_link_flags(${MODULE} "-Wl,--major-image-version,5 -Wl,--minor-image-version,01")
|
||||||
|
add_target_link_flags(${MODULE} "-Wl,--major-os-version,5 -Wl,--minor-os-version,01")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Set unicode definitions
|
||||||
if(__module_UNICODE)
|
if(__module_UNICODE)
|
||||||
add_target_compile_definitions(${MODULE} UNICODE _UNICODE)
|
add_target_compile_definitions(${MODULE} UNICODE _UNICODE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# set entry point
|
# Set entry point
|
||||||
if(__module_ENTRYPOINT OR (__module_ENTRYPOINT STREQUAL "0"))
|
if(__module_ENTRYPOINT OR (__module_ENTRYPOINT STREQUAL "0"))
|
||||||
list(GET __module_ENTRYPOINT 0 __entrypoint)
|
list(GET __module_ENTRYPOINT 0 __entrypoint)
|
||||||
list(LENGTH __module_ENTRYPOINT __length)
|
list(LENGTH __module_ENTRYPOINT __length)
|
||||||
|
@ -633,7 +641,7 @@ function(set_module_type MODULE TYPE)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
#set base address
|
# Set base address
|
||||||
if(__module_IMAGEBASE)
|
if(__module_IMAGEBASE)
|
||||||
set_image_base(${MODULE} ${__module_IMAGEBASE})
|
set_image_base(${MODULE} ${__module_IMAGEBASE})
|
||||||
elseif(${TYPE} STREQUAL win32dll)
|
elseif(${TYPE} STREQUAL win32dll)
|
||||||
|
@ -662,7 +670,7 @@ function(set_module_type MODULE TYPE)
|
||||||
set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl")
|
set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# do compiler specific stuff
|
# Do compiler specific stuff
|
||||||
set_module_type_toolchain(${MODULE} ${TYPE})
|
set_module_type_toolchain(${MODULE} ${TYPE})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
|
@ -289,7 +289,7 @@ function(set_entrypoint MODULE ENTRYPOINT)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(set_subsystem MODULE SUBSYSTEM)
|
function(set_subsystem MODULE SUBSYSTEM)
|
||||||
add_target_link_flags(${MODULE} "-Wl,--subsystem,${SUBSYSTEM}")
|
add_target_link_flags(${MODULE} "-Wl,--subsystem,${SUBSYSTEM}:5.01")
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(set_image_base MODULE IMAGE_BASE)
|
function(set_image_base MODULE IMAGE_BASE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue