summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt12
-rwxr-xr-xsrc/resources/generate-fonts.py2
2 files changed, 12 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index f81e7026..92f309a1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -940,6 +940,10 @@ add_custom_command(TARGET ${EXECUTABLE_NAME}
COMMAND ${CMAKE_OBJCOPY} -O ihex ${EXECUTABLE_FILE_NAME}.out "${EXECUTABLE_FILE_NAME}.hex"
COMMENT "post build steps for ${EXECUTABLE_FILE_NAME}")
+if(BUILD_RESOURCES)
+ add_dependencies(${EXECUTABLE_NAME} GenerateResources)
+endif()
+
# Build binary intended to be used by bootloader
set(EXECUTABLE_MCUBOOT_NAME "pinetime-mcuboot-app")
set(EXECUTABLE_MCUBOOT_FILE_NAME ${EXECUTABLE_MCUBOOT_NAME}-${pinetime_VERSION_MAJOR}.${pinetime_VERSION_MINOR}.${pinetime_VERSION_PATCH})
@@ -973,6 +977,10 @@ add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_NAME}
COMMENT "post build steps for ${EXECUTABLE_MCUBOOT_FILE_NAME}"
)
+if(BUILD_RESOURCES)
+ add_dependencies(${EXECUTABLE_MCUBOOT_NAME} GenerateResources)
+endif()
+
if(BUILD_DFU)
add_custom_command(TARGET ${EXECUTABLE_MCUBOOT_NAME}
POST_BUILD
@@ -1127,7 +1135,9 @@ if(BUILD_DFU)
)
endif()
-add_subdirectory(resources)
+if(BUILD_RESOURCES)
+ add_subdirectory(resources)
+endif()
# FLASH
diff --git a/src/resources/generate-fonts.py b/src/resources/generate-fonts.py
index d6b47ab2..20408166 100755
--- a/src/resources/generate-fonts.py
+++ b/src/resources/generate-fonts.py
@@ -20,7 +20,7 @@ class Source(object):
def gen_lvconv_line(lv_font_conv: str, dest: str, size: int, bpp: int, format: str, sources: typing.List[Source], compress:bool=False):
if format != "lvgl" and format != "bin":
- format = "lvgl"
+ format = "bin" if dest.lower().endswith(".bin") else "lvgl"
args = [lv_font_conv, '--size', str(size), '--output', dest, '--bpp', str(bpp), '--format', format]
if not compress: