cmake: implementing bootable CD-ROM image generation with GRUB
This commit is contained in:
17
arch/x86_64/System-Disk.cmake
Normal file
17
arch/x86_64/System-Disk.cmake
Normal file
@@ -0,0 +1,17 @@
|
||||
find_program(GRUB_MKRESCUE grub-mkrescue)
|
||||
|
||||
if (GRUB_MKRESCUE)
|
||||
message(STATUS "GRUB: Found grub-mkrescue. Bootable CD-ROM image creation is enabled")
|
||||
set(image_cdrom ${CMAKE_CURRENT_BINARY_DIR}/rosetta-system.iso)
|
||||
|
||||
add_custom_target(cdrom
|
||||
DEPENDS sysroot
|
||||
COMMAND ${GRUB_MKRESCUE}
|
||||
-o ${image_cdrom}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/sysroot
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Building GRUB CD-ROM image"
|
||||
)
|
||||
else ()
|
||||
message(STATUS "Cannot find grub-mkrescue. Bootable CD-ROM image creation is unavailable")
|
||||
endif ()
|
||||
Reference in New Issue
Block a user