diff options
Diffstat (limited to 'res/Fontpack.cmake')
-rw-r--r-- | res/Fontpack.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/res/Fontpack.cmake b/res/Fontpack.cmake new file mode 100644 index 00000000..9471c93d --- /dev/null +++ b/res/Fontpack.cmake | |||
@@ -0,0 +1,16 @@ | |||
1 | find_program (ZIP_EXECUTABLE zip DOC "ZIP archiver") | ||
2 | |||
3 | function (make_fontpack src) | ||
4 | get_filename_component (dst ${src} NAME) | ||
5 | set (fn ${CMAKE_BINARY_DIR}/${dst}) | ||
6 | execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${fn}) | ||
7 | file (GLOB files RELATIVE ${CMAKE_SOURCE_DIR}/${src} | ||
8 | ${CMAKE_SOURCE_DIR}/${src}/* | ||
9 | ) | ||
10 | message (STATUS " ${src}") | ||
11 | execute_process ( | ||
12 | COMMAND ${ZIP_EXECUTABLE} -0 ${fn} ${files} | ||
13 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${src} | ||
14 | OUTPUT_QUIET | ||
15 | ) | ||
16 | endfunction () | ||