Author: hbelusca
Date: Thu Jul 13 20:50:49 2017
New Revision: 75333
URL:
http://svn.reactos.org/svn/reactos?rev=75333&view=rev
Log:
[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.
Modified:
trunk/reactos/sdk/cmake/CMakeMacros.cmake
trunk/reactos/sdk/cmake/gcc.cmake
Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/CMakeMacros.cmak…
==============================================================================
--- trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Thu Jul 13 20:50:49 2017
@@ -581,12 +581,20 @@
set_subsystem(${MODULE} ${__subsystem})
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)
add_target_compile_definitions(${MODULE} UNICODE _UNICODE)
endif()
- # set entry point
+ # Set entry point
if(__module_ENTRYPOINT OR (__module_ENTRYPOINT STREQUAL "0"))
list(GET __module_ENTRYPOINT 0 __entrypoint)
list(LENGTH __module_ENTRYPOINT __length)
@@ -633,7 +641,7 @@
endif()
endif()
- #set base address
+ # Set base address
if(__module_IMAGEBASE)
set_image_base(${MODULE} ${__module_IMAGEBASE})
elseif(${TYPE} STREQUAL win32dll)
@@ -662,7 +670,7 @@
set_target_properties(${MODULE} PROPERTIES SUFFIX ".cpl")
endif()
- # do compiler specific stuff
+ # Do compiler specific stuff
set_module_type_toolchain(${MODULE} ${TYPE})
endfunction()
Modified: trunk/reactos/sdk/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/gcc.cmake?rev=75…
==============================================================================
--- trunk/reactos/sdk/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/sdk/cmake/gcc.cmake [iso-8859-1] Thu Jul 13 20:50:49 2017
@@ -289,7 +289,7 @@
endfunction()
function(set_subsystem MODULE SUBSYSTEM)
- add_target_link_flags(${MODULE} "-Wl,--subsystem,${SUBSYSTEM}")
+ add_target_link_flags(${MODULE} "-Wl,--subsystem,${SUBSYSTEM}:5.01")
endfunction()
function(set_image_base MODULE IMAGE_BASE)