18 lines
545 B
CMake
18 lines
545 B
CMake
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 ()
|