Fix the filename used for exports
All checks were successful
Builds / ExectOS (amd64) (push) Successful in 35s
Builds / ExectOS (i686) (push) Successful in 25s

This commit is contained in:
Rafal Kupiec 2024-02-07 17:15:23 +01:00
parent 99abcd63d1
commit 460ba7c857
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
2 changed files with 6 additions and 5 deletions

View File

@ -89,13 +89,13 @@ function(set_install_target TARGET DESTINATION)
endfunction() endfunction()
# This function is responsible for compiling module SPEC file # This function is responsible for compiling module SPEC file
function(set_specfile SPECFILE) function(set_specfile SPECFILE EXPORTNAME)
if(NOT ${ARGC} EQUAL 1) if(NOT ${ARGC} EQUAL 2)
message(FATAL_ERROR "Invalid number of arguments passed to set_specfile() function") message(FATAL_ERROR "Invalid number of arguments passed to set_specfile() function")
endif() endif()
get_filename_component(FILENAME ${SPECFILE} NAME_WE) get_filename_component(FILENAME ${SPECFILE} NAME_WE)
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.def ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.c add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.def ${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.c
COMMAND ${CMAKE_SPEC_COMPILER} -a=${ARCH} -d=${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.c ${CMAKE_CURRENT_SOURCE_DIR}/${SPECFILE}) COMMAND ${CMAKE_SPEC_COMPILER} -a=${ARCH} -n=${EXPORTNAME} -d=${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.def -s=${CMAKE_CURRENT_BINARY_DIR}/${FILENAME}.c ${CMAKE_CURRENT_SOURCE_DIR}/${SPECFILE})
endfunction() endfunction()
# This function sets the the qemu disk image size (in MiB) # This function sets the the qemu disk image size (in MiB)

View File

@ -51,7 +51,7 @@ list(APPEND XTOSKRNL_SOURCE
${XTOSKRNL_SOURCE_DIR}/rtl/${ARCH}/exsup.c) ${XTOSKRNL_SOURCE_DIR}/rtl/${ARCH}/exsup.c)
# Set module definition SPEC file # Set module definition SPEC file
set_specfile(xtoskrnl.spec) set_specfile(xtoskrnl.spec xtoskrnl.exe)
# Link static XTOS library # Link static XTOS library
add_library(libxtos ${XTOSKRNL_SOURCE}) add_library(libxtos ${XTOSKRNL_SOURCE})
@ -64,7 +64,8 @@ add_executable(xtoskrnl
# Add linker libraries # Add linker libraries
target_link_libraries(xtoskrnl) target_link_libraries(xtoskrnl)
# Set instal target # Set proper binary name and install target
set_target_properties(xtoskrnl PROPERTIES SUFFIX .exe)
set_install_target(xtoskrnl "exectos/boot") set_install_target(xtoskrnl "exectos/boot")
# Set kernel entrypoint, imagebase address, ordinals and subsystem # Set kernel entrypoint, imagebase address, ordinals and subsystem