summaryrefslogtreecommitdiff
path: root/res/Fontpack.cmake
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-10-07 18:03:27 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-10-07 18:03:27 +0300
commit3d1a4a8e68fa673fed311710dd9303e928eea663 (patch)
treed59bdd26b8ddbdce9877f671188d878cc087cd89 /res/Fontpack.cmake
parentc9ded71342f4e47b48151782a48fc488a5f63e56 (diff)
Package all fonts into .fontpacks
All fonts except default.fontpack will be distributed separately, or at least outside of resources.lgr.
Diffstat (limited to 'res/Fontpack.cmake')
-rw-r--r--res/Fontpack.cmake16
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 @@
1find_program (ZIP_EXECUTABLE zip DOC "ZIP archiver")
2
3function (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 )
16endfunction ()