From a4ee0c9279d75f5d4e387fcac1c6cce46957b3e0 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 26 Apr 2022 10:04:07 +0200 Subject: find dd dynamically, make duration configurable --- cmake/FindSameBoy.cmake | 2 +- cmake/FindSameBoyBootRom.cmake | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'cmake') diff --git a/cmake/FindSameBoy.cmake b/cmake/FindSameBoy.cmake index 6f507e4..1fcf2ac 100644 --- a/cmake/FindSameBoy.cmake +++ b/cmake/FindSameBoy.cmake @@ -11,7 +11,7 @@ endif() set(SAMEBOY_PATH ${PROJECT_SOURCE_DIR}/deps/SameBoy) if(NOT EXISTS ${SAMEBOY_PATH}/README.md) - message(FATAL_ERROR "Unable to find SameBoy.\n Make sure to run `git submodule update --init --recursive`") + message(FATAL_ERROR "Unable to find SameBoy.\n Make sure to download the submodules") endif() diff --git a/cmake/FindSameBoyBootRom.cmake b/cmake/FindSameBoyBootRom.cmake index 5aadef3..ac2b3c5 100644 --- a/cmake/FindSameBoyBootRom.cmake +++ b/cmake/FindSameBoyBootRom.cmake @@ -13,7 +13,8 @@ add_executable(pb12 ${SAMEBOY_BOOTROM_PATH}/pb12.c) find_program(RGBASM rgbasm REQUIRED) find_program(RGBLINK rgblink REQUIRED) find_program(RGBGFX rgbgfx REQUIRED) -mark_as_advanced(RGBASM RGBLINK RGBGFX) +find_program(DD dd REQUIRED) +mark_as_advanced(RGBASM RGBLINK RGBGFX DD) # custom build step add_custom_command( @@ -34,7 +35,7 @@ add_custom_command( COMMAND ${RGBLINK} -o ${SAMEBOY_BOOTROM_VERSION}.tmp2 ${SAMEBOY_BOOTROM_VERSION}.tmp COMMAND - dd if=${SAMEBOY_BOOTROM_VERSION}.tmp2 of=${SAMEBOY_BOOTROM_VERSION}.bin count=1 bs=${SAMEBOY_BOOTROM_SIZE} + ${DD} if=${SAMEBOY_BOOTROM_VERSION}.tmp2 of=${SAMEBOY_BOOTROM_VERSION}.bin count=1 bs=${SAMEBOY_BOOTROM_SIZE} DEPENDS SameBoyLogo.pb12 VERBATIM ) -- cgit v1.2.3