implement system fonts search for Linux

This commit is contained in:
ohyzha
2025-01-17 14:01:24 +02:00
parent 169d6c4129
commit dbc52eff42
4 changed files with 70 additions and 1 deletions

View File

@@ -15,6 +15,17 @@ if (APPLE)
list(FILTER SOURCES EXCLUDE REGEX "ExeAppendedZipResourceLoader")
endif()
if (LINUX)
find_program(LSB_RELEASE_EXEC lsb_release)
execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
OUTPUT_STRIP_TRAILING_WHITESPACE
)
if (NOT ${LSB_RELEASE_ID_SHORT} STREQUAL "Ubuntu")
list(FILTER SOURCES EXCLUDE REGEX "*Ubuntu*")
endif()
endif()
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${SOURCES})
file(GLOB_RECURSE RESOURCES "${ROOT_FOLDER}/resources/*.rc" "${ROOT_FOLDER}/resources/*.h")
list(APPEND SOURCES ${RESOURCES})