mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:37:35 +00:00
Kernel: Bake version information into the Kernel
This is done by generating a Kernel/Version.h header with major version, minor version, and git hash.
This commit is contained in:
parent
92c203bba2
commit
7c05eed487
2 changed files with 50 additions and 0 deletions
|
@ -410,6 +410,18 @@ set(ELF_SOURCES
|
|||
../Userland/Libraries/LibELF/Validation.cpp
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
COMMAND "${SerenityOS_SOURCE_DIR}/Kernel/generate-version-file.sh" "${CMAKE_CURRENT_BINARY_DIR}/Version.h.tmp"
|
||||
COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${CMAKE_CURRENT_BINARY_DIR}/Version.h.tmp" "${CMAKE_CURRENT_BINARY_DIR}/Version.h"
|
||||
COMMAND "${CMAKE_COMMAND}" -E remove "${CMAKE_CURRENT_BINARY_DIR}/Version.h.tmp"
|
||||
WORKING_DIRECTORY "${SerenityOS_SOURCE_DIR}"
|
||||
COMMENT "Generating SerenityOS version information"
|
||||
OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/Version.h"
|
||||
VERBATIM
|
||||
)
|
||||
add_custom_target(generate_version_header ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/Version.h")
|
||||
set(GENERATED_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/Version.h")
|
||||
|
||||
generate_state_machine(../Userland/Libraries/LibVT/StateMachine.txt ../Userland/Libraries/LibVT/EscapeSequenceStateMachine.h)
|
||||
|
||||
set(VT_SOURCES
|
||||
|
@ -437,6 +449,7 @@ set(SOURCES
|
|||
if (NOT "${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||
set(SOURCES
|
||||
${KERNEL_SOURCES}
|
||||
${GENERATED_SOURCES}
|
||||
${SOURCES}
|
||||
${EDID_SOURCES}
|
||||
${ELF_SOURCES}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue