Changeset View
Changeset View
Standalone View
Standalone View
CMakeLists.txt
Show All 16 Lines | |||||
17 | include(GtkUpdateIconCache) | 17 | include(GtkUpdateIconCache) | ||
18 | 18 | | |||
19 | # Dependencies | 19 | # Dependencies | ||
20 | set(REQUIRED_QT_VERSION 5.6.0) | 20 | set(REQUIRED_QT_VERSION 5.6.0) | ||
21 | 21 | | |||
22 | option(BINARY_ICONS_RESOURCE "Install Qt binary resource files containing breeze icons (breeze-icons.rcc, breeze-icons-dark.rcc)" ON) | 22 | option(BINARY_ICONS_RESOURCE "Install Qt binary resource files containing breeze icons (breeze-icons.rcc, breeze-icons-dark.rcc)" ON) | ||
23 | option(SKIP_INSTALL_ICONS "Skip installing the icons files" OFF) | 23 | option(SKIP_INSTALL_ICONS "Skip installing the icons files" OFF) | ||
24 | 24 | | |||
25 | option(VALIDATE_ICONS "Run xmllint on the svg icons" OFF) | ||||
26 | | ||||
25 | if(BINARY_ICONS_RESOURCE) | 27 | if(BINARY_ICONS_RESOURCE) | ||
26 | find_package(Qt5 NO_MODULE REQUIRED Core) | 28 | find_package(Qt5 NO_MODULE REQUIRED Core) | ||
27 | add_executable(qrcAlias qrcAlias.cpp) | 29 | add_executable(qrcAlias qrcAlias.cpp) | ||
28 | target_link_libraries(qrcAlias PUBLIC Qt5::Core) | 30 | target_link_libraries(qrcAlias PUBLIC Qt5::Core) | ||
29 | 31 | | |||
30 | function(generate_binary_resource target outfile) | 32 | function(generate_binary_resource target outfile) | ||
31 | set(RESOURCES_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}/res) | 33 | set(RESOURCES_WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR}/res) | ||
32 | set(RESOURCE_FILE ${RESOURCES_WORKING_DIR}/breeze-${target}.qrc) | 34 | set(RESOURCE_FILE ${RESOURCES_WORKING_DIR}/breeze-${target}.qrc) | ||
Show All 26 Lines | |||||
59 | ) | 61 | ) | ||
60 | 62 | | |||
61 | add_custom_target(breeze-${target}-rcc ALL DEPENDS ${BINARY_RESOURCE_FILE}) | 63 | add_custom_target(breeze-${target}-rcc ALL DEPENDS ${BINARY_RESOURCE_FILE}) | ||
62 | 64 | | |||
63 | set(${outfile} ${BINARY_RESOURCE_FILE} PARENT_SCOPE) | 65 | set(${outfile} ${BINARY_RESOURCE_FILE} PARENT_SCOPE) | ||
64 | endfunction() | 66 | endfunction() | ||
65 | endif() | 67 | endif() | ||
66 | 68 | | |||
67 | if(NOT WIN32) | 69 | if(NOT WIN32) and (VALIDATE_ICONS) | ||
68 | find_program(BASH_EXE bash) | | |||
69 | if (BASH_EXE) | | |||
70 | file(GLOB_RECURSE SVGS "*.svg") | 70 | file(GLOB_RECURSE SVGS "*.svg") | ||
71 | add_custom_target(breeze-validate-svg ALL | 71 | add_custom_target(breeze-validate-svg ALL | ||
72 | COMMAND ${BASH_EXE} ${CMAKE_SOURCE_DIR}/validate_svg.sh | 72 | COMMAND ${BASH_EXE} ${CMAKE_SOURCE_DIR}/validate_svg.sh | ||
73 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | 73 | WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
74 | SOURCES ${SVGS} | 74 | SOURCES ${SVGS} | ||
75 | ) | 75 | ) | ||
76 | endif() | 76 | endif() | ||
77 | endif() | | |||
78 | 77 | | |||
79 | add_subdirectory(autotests) | 78 | add_subdirectory(autotests) | ||
80 | add_subdirectory(icons) | 79 | add_subdirectory(icons) | ||
81 | add_subdirectory(icons-dark) | 80 | add_subdirectory(icons-dark) | ||
82 | 81 | | |||
83 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES INCLUDE_QUIET_PACKAGES) | 82 | feature_summary(WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES INCLUDE_QUIET_PACKAGES) |