aboutsummaryrefslogtreecommitdiff
path: root/tests/ECMInstallIconsTest
diff options
context:
space:
mode:
authorl10n daemon script <scripty@kde.org>2015-11-08 21:01:33 +0000
committerl10n daemon script <scripty@kde.org>2015-11-08 21:01:33 +0000
commit7feccae76e01a65b406995b5ba9526fe9ade4299 (patch)
tree99011137f4dedcf4bf242e167ac7dc70d9136b8e /tests/ECMInstallIconsTest
parenta1bb0b0488843165e606771b75a3a67ba8a131a6 (diff)
parentc88bc78e0ca3834c46b89ca9d14b404751da5d4a (diff)
downloadextra-cmake-modules-5.16.0.tar.gz
extra-cmake-modules-5.16.0.tar.bz2
Merge remote-tracking branch 'origin/master' into local_releasev5.16.0-rc2v5.16.0
Diffstat (limited to 'tests/ECMInstallIconsTest')
-rw-r--r--tests/ECMInstallIconsTest/CMakeLists.txt23
-rw-r--r--tests/ECMInstallIconsTest/check_tree.cmake.in7
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/16x16/actions/old-style-name.png (renamed from tests/ECMInstallIconsTest/16-apps-cmake.png)bin233 -> 233 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/icon-theme.cachebin0 -> 124 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/icon-theme.cachebin0 -> 548 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/icon-theme.cachebin0 -> 472 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/single-file-test/hicolor/icon-theme.cachebin0 -> 120 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/icon-theme.cachebin0 -> 548 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/icon-theme.cachebin0 -> 472 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/v1-icons/crystalsvg/icon-theme.cachebin0 -> 164 bytes
-rw-r--r--tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/icon-theme.cachebin0 -> 452 bytes
-rw-r--r--tests/ECMInstallIconsTest/hi16-actions-old-style-name.pngbin0 -> 233 bytes
-rw-r--r--tests/ECMInstallIconsTest/subdir/16-apps-cmake.pngbin0 -> 233 bytes
-rw-r--r--tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt1
14 files changed, 24 insertions, 7 deletions
diff --git a/tests/ECMInstallIconsTest/CMakeLists.txt b/tests/ECMInstallIconsTest/CMakeLists.txt
index 85f2d9f5..f048889e 100644
--- a/tests/ECMInstallIconsTest/CMakeLists.txt
+++ b/tests/ECMInstallIconsTest/CMakeLists.txt
@@ -10,6 +10,7 @@ include(ECMInstallIcons)
add_subdirectory(v1-syntax)
add_subdirectory(v1-syntax-l10n)
+add_subdirectory(v1-syntax-no-icons)
ecm_install_icons(
ICONS 16-actions-computer.png
@@ -20,7 +21,7 @@ ecm_install_icons(
ICONS
16-actions-computer.png
16-animations-loading.mng
- 16-apps-cmake.png
+ subdir/16-apps-cmake.png
16-categories-system-help.mng
16-emotes-face-smile.png
16-intl-something.png
@@ -36,7 +37,7 @@ ecm_install_icons(
ICONS
16-actions-computer.png
16-animations-loading.mng
- 16-apps-cmake.png
+ subdir/16-apps-cmake.png
16-categories-system-help.mng
16-emotes-face-smile.png
16-intl-something.png
@@ -53,7 +54,7 @@ ecm_install_icons(
ICONS
16-actions-computer.png
16-animations-loading.mng
- 16-apps-cmake.png
+ subdir/16-apps-cmake.png
16-categories-system-help.mng
16-emotes-face-smile.png
16-intl-something.png
@@ -70,7 +71,7 @@ ecm_install_icons(
ICONS
16-actions-computer.png
16-animations-loading.mng
- 16-apps-cmake.png
+ subdir/16-apps-cmake.png
16-categories-system-help.mng
16-emotes-face-smile.png
16-intl-something.png
@@ -87,11 +88,19 @@ ecm_install_icons(
# all these should be warned about
ecm_install_icons(
ICONS
- aa-actions-badsize.png # ignored
- badlynamedfile.png # ignored
- 16-actions-badext.txt # copied
+ aa-actions-badsize.png # ignored
+ badlynamedfile.png # ignored
+ 16-actions-badext.txt # copied
+ hi16-actions-old-style-name.png # copied
DESTINATION badly-named-files-test
)
+find_program(icon_cache_generator NAMES gtk-update-icon-cache)
+if (icon_cache_generator)
+ set(GENERATE_ICON_CACHE TRUE)
+else()
+ set(GENERATE_ICON_CACHE FALSE)
+endif()
+
# this will be run by CTest
configure_file(check_tree.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check_tree.cmake" @ONLY)
diff --git a/tests/ECMInstallIconsTest/check_tree.cmake.in b/tests/ECMInstallIconsTest/check_tree.cmake.in
index 6d14246b..b9da1715 100644
--- a/tests/ECMInstallIconsTest/check_tree.cmake.in
+++ b/tests/ECMInstallIconsTest/check_tree.cmake.in
@@ -1,8 +1,15 @@
set(EXP_TREE "@CMAKE_CURRENT_SOURCE_DIR@/expected-tree")
set(ACTUAL_TREE "@CMAKE_INSTALL_PREFIX@")
+set(GENERATE_ICON_CACHE "@GENERATE_ICON_CACHE@")
file(GLOB_RECURSE exp_files RELATIVE "${EXP_TREE}" "${EXP_TREE}/*")
file(GLOB_RECURSE actual_files RELATIVE "${ACTUAL_TREE}" "${ACTUAL_TREE}/*")
+if (NOT GENERATE_ICON_CACHE)
+ file(GLOB_RECURSE cache_files RELATIVE "${EXP_TREE}" "${EXP_TREE}/*.cache")
+ foreach(f ${cache_files})
+ list(REMOVE_ITEM exp_files "${f}")
+ endforeach()
+endif()
list(SORT exp_files)
list(SORT actual_files)
diff --git a/tests/ECMInstallIconsTest/16-apps-cmake.png b/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/16x16/actions/old-style-name.png
index ed9a1181..ed9a1181 100644
--- a/tests/ECMInstallIconsTest/16-apps-cmake.png
+++ b/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/16x16/actions/old-style-name.png
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/icon-theme.cache
new file mode 100644
index 00000000..50d52976
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/badly-named-files-test/hicolor/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/icon-theme.cache
new file mode 100644
index 00000000..babadff0
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/lang-test/hicolor/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/icon-theme.cache
new file mode 100644
index 00000000..60ac05d6
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/multi-file-test/hicolor/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/single-file-test/hicolor/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/single-file-test/hicolor/icon-theme.cache
new file mode 100644
index 00000000..f385659f
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/single-file-test/hicolor/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/icon-theme.cache
new file mode 100644
index 00000000..babadff0
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/themed-lang-test/oxygen/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/icon-theme.cache
new file mode 100644
index 00000000..60ac05d6
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/themed-test/theme-name-2/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/v1-icons/crystalsvg/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/v1-icons/crystalsvg/icon-theme.cache
new file mode 100644
index 00000000..8b9c8d0c
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/v1-icons/crystalsvg/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/icon-theme.cache b/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/icon-theme.cache
new file mode 100644
index 00000000..ab56337b
--- /dev/null
+++ b/tests/ECMInstallIconsTest/expected-tree/v1-icons/hicolor/icon-theme.cache
Binary files differ
diff --git a/tests/ECMInstallIconsTest/hi16-actions-old-style-name.png b/tests/ECMInstallIconsTest/hi16-actions-old-style-name.png
new file mode 100644
index 00000000..ed9a1181
--- /dev/null
+++ b/tests/ECMInstallIconsTest/hi16-actions-old-style-name.png
Binary files differ
diff --git a/tests/ECMInstallIconsTest/subdir/16-apps-cmake.png b/tests/ECMInstallIconsTest/subdir/16-apps-cmake.png
new file mode 100644
index 00000000..ed9a1181
--- /dev/null
+++ b/tests/ECMInstallIconsTest/subdir/16-apps-cmake.png
Binary files differ
diff --git a/tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt b/tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt
new file mode 100644
index 00000000..e0cacec2
--- /dev/null
+++ b/tests/ECMInstallIconsTest/v1-syntax-no-icons/CMakeLists.txt
@@ -0,0 +1 @@
+ecm_install_icons(v1-icons-dummy)