Build ISO target.

This commit is contained in:
Nicolás Ortega Froysa 2018-03-14 22:39:49 +01:00
parent 844de4d139
commit 3d4e2e48c9
No known key found for this signature in database
GPG Key ID: FEC70E3BAE2E69BF

View File

@ -54,3 +54,12 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86")
endif() endif()
add_executable(${TARGET_NAME} ${SRCS}) add_executable(${TARGET_NAME} ${SRCS})
add_custom_target(build-iso
COMMAND mkdir -p isodir/boot/grub/
COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/configs/grub.cfg isodir/boot/grub/
COMMAND cp ${TARGET_NAME} isodir/boot/
COMMAND grub-mkrescue -o colonel.iso isodir
DEPENDS ${TARGET_NAME}
COMMENT "Building ISO iamge..."
SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/configs/grub.cfg)