Skip to content

Commit

Permalink
cuse add ressources instead of the whole qml thingy
Browse files Browse the repository at this point in the history
  • Loading branch information
OlivierLDff committed Aug 20, 2024
1 parent 13de803 commit 33d41f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
11 changes: 2 additions & 9 deletions qml/Qaterial/Fonts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,11 @@ if(QATERIAL_ENABLE_LATO)
)
endif()

message(STATUS "Generate QaterialFonts.qrc")

file(GLOB_RECURSE QATERIAL_FONTS_FILES
LIST_DIRECTORIES false
"${QATERIAL_FONT_DIRECTORY}/*.ttf"
)


foreach(QATERIAL_FONT_FILE ${QATERIAL_FONTS_FILES})
get_filename_component(QATERIAL_FONT_FILE_NAME ${QATERIAL_FONT_FILE} NAME)
set_source_files_properties(${QATERIAL_FONT_FILE} PROPERTIES
Expand All @@ -85,13 +82,9 @@ foreach(QATERIAL_FONT_FILE ${QATERIAL_FONTS_FILES})
endforeach()

qt_add_library(${QATERIAL_TARGET}Fonts STATIC ${QATERIAL_FONTS_QML_QRC})
qt_add_qml_module(${QATERIAL_TARGET}Fonts
URI "Qaterial.Fonts"
RESOURCE_PREFIX "/"
RESOURCES
${QATERIAL_FONTS_FILES}
qt_add_resources(${QATERIAL_TARGET}Fonts ${QATERIAL_FONTS_FILES}
RESOURCE_PREFIX "/Qaterial/Fonts"
OUTPUT_TARGETS QATERIAL_FONTS_QML_TARGETS
NO_PLUGIN
)
add_library(${QATERIAL_TARGET}::Fonts ALIAS ${QATERIAL_TARGET}Fonts)
set_target_properties(${QATERIAL_TARGET}Fonts PROPERTIES AUTORCC TRUE)
Expand Down
8 changes: 2 additions & 6 deletions qml/Qaterial/Icons/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ endif()
qt_add_library(${QATERIAL_TARGET}Icons STATIC)

if(QATERIAL_ENABLE_ICONS)
qt_add_qml_module(${QATERIAL_TARGET}Icons
URI "Qaterial.Icons"
RESOURCE_PREFIX "/"
RESOURCES
${QATERIAL_ICONS_FILES}
qt_add_ressources(${QATERIAL_TARGET}Icons ${QATERIAL_ICONS_FILES}
RESOURCE_PREFIX "/Qaterial/Icons"
OUTPUT_TARGETS QATERIAL_ICONS_QML_TARGETS
NO_PLUGIN
)
endif()

Expand Down

0 comments on commit 33d41f6

Please sign in to comment.