diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-31 05:56:22 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-10-31 05:56:22 +0200 |
commit | 0e45bfe8d592984ce6f3c42265d863d8df7a0ea3 (patch) | |
tree | e60b20bb876a97df7b6f3e1f4d631e798239765d | |
parent | 511fadcf0aff03d7d6e963143028f0413132a358 (diff) | |
parent | 16c308157ebb54cf4fc3e0897c7419eb12849b7a (diff) |
Merge branch 'dev' of skyjake.fi:gemini/lagrange into dev
-rw-r--r-- | res/Embed.cmake | 2 | ||||
-rw-r--r-- | res/Fontpack.cmake | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/res/Embed.cmake b/res/Embed.cmake index fe859dbc..70ac10ed 100644 --- a/res/Embed.cmake +++ b/res/Embed.cmake | |||
@@ -100,7 +100,7 @@ function (embed_make) | |||
100 | # Collect resources in a single binary file. | 100 | # Collect resources in a single binary file. |
101 | set (EMB_BIN ${CMAKE_CURRENT_BINARY_DIR}/resources.lgr) | 101 | set (EMB_BIN ${CMAKE_CURRENT_BINARY_DIR}/resources.lgr) |
102 | file (REMOVE ${EMB_BIN}) | 102 | file (REMOVE ${EMB_BIN}) |
103 | list (LENGTH ARGV fileCount) | 103 | list (LENGTH ARGV fileCount) |
104 | execute_process (COMMAND ${BINCAT_COMMAND} ${EMB_BIN} ${ARGV} | 104 | execute_process (COMMAND ${BINCAT_COMMAND} ${EMB_BIN} ${ARGV} |
105 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} | 105 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} |
106 | OUTPUT_VARIABLE fileSizes | 106 | OUTPUT_VARIABLE fileSizes |
diff --git a/res/Fontpack.cmake b/res/Fontpack.cmake index 9471c93d..26d6df1e 100644 --- a/res/Fontpack.cmake +++ b/res/Fontpack.cmake | |||
@@ -1,15 +1,18 @@ | |||
1 | find_program (ZIP_EXECUTABLE zip DOC "ZIP archiver") | 1 | find_program (ZIP_EXECUTABLE zip DOC "ZIP archiver") |
2 | if (NOT ZIP_EXECUTABLE) | ||
3 | message (FATAL_ERROR "Please install 'zip' to create fontpacks.") | ||
4 | endif () | ||
2 | 5 | ||
3 | function (make_fontpack src) | 6 | function (make_fontpack src) |
4 | get_filename_component (dst ${src} NAME) | 7 | get_filename_component (dst ${src} NAME) |
5 | set (fn ${CMAKE_BINARY_DIR}/${dst}) | 8 | set (fn ${CMAKE_BINARY_DIR}/${dst}) |
6 | execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${fn}) | 9 | execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${fn}) |
7 | file (GLOB files RELATIVE ${CMAKE_SOURCE_DIR}/${src} | 10 | file (GLOB files RELATIVE ${CMAKE_SOURCE_DIR}/${src} |
8 | ${CMAKE_SOURCE_DIR}/${src}/* | 11 | ${CMAKE_SOURCE_DIR}/${src}/* |
9 | ) | 12 | ) |
10 | message (STATUS " ${src}") | 13 | message (STATUS " ${src}") |
11 | execute_process ( | 14 | execute_process ( |
12 | COMMAND ${ZIP_EXECUTABLE} -0 ${fn} ${files} | 15 | COMMAND ${ZIP_EXECUTABLE} -0 ${fn} ${files} |
13 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${src} | 16 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${src} |
14 | OUTPUT_QUIET | 17 | OUTPUT_QUIET |
15 | ) | 18 | ) |