summaryrefslogtreecommitdiff
path: root/res/Fontpack.cmake
blob: 9471c93d97073175b24541d534d0dd21ea803888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
find_program (ZIP_EXECUTABLE zip DOC "ZIP archiver")

function (make_fontpack src)
    get_filename_component (dst ${src} NAME)
    set (fn ${CMAKE_BINARY_DIR}/${dst})
    execute_process (COMMAND ${CMAKE_COMMAND} -E remove ${fn})
    file (GLOB files RELATIVE ${CMAKE_SOURCE_DIR}/${src}
        ${CMAKE_SOURCE_DIR}/${src}/*        
    )
    message (STATUS "  ${src}")
    execute_process (
        COMMAND ${ZIP_EXECUTABLE} -0 ${fn} ${files}        
        WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${src}
        OUTPUT_QUIET
    )
endfunction ()