share/hedgewars/Data/Fonts/CMakeLists.txt
author S.D.
Fri, 23 Sep 2022 02:21:21 +0300
changeset 15897 d7b53d08ad9c
parent 9994 8455993a7a1b
permissions -rw-r--r--
Add FastForward/StopFastForward (/ff hh:mm:ss, /sff) chat commands to fast forward to a specific timestamp in a demo

set(FONTFILES
    DejaVuSans-Bold.ttf
    wqy-zenhei.ttc)

if (FONTS_DIRS)
    foreach(fontfile ${FONTFILES})
        set(missing 1)
        foreach(fontdir ${FONTS_DIRS})
            if (EXISTS "${fontdir}/${fontfile}")
                message(STATUS "Fonts: Found ${fontfile} in ${fontdir}")
                set(missing 0)
                break()
            endif()
        endforeach(fontdir)
        if(missing)
            set(MISSINGFONTFILES ${MISSINGFONTFILES} ${fontfile})
            message(STATUS "Fonts: Could not find ${fontfile}, it will be installed")
        endif()
    endforeach(fontfile)
else()
    set(MISSINGFONTFILES ${FONTFILES})
endif()

if (MISSINGFONTFILES)
    install(FILES ${MISSINGFONTFILES} DESTINATION ${SHAREPATH}Data/Fonts)
endif()