diff options
author | Gleb Popov <6yearold@gmail.com> | 2016-01-13 23:17:30 +0300 |
---|---|---|
committer | Gleb Popov <6yearold@gmail.com> | 2016-01-31 17:55:29 +0300 |
commit | 2e514935c37f46e44f9ae9cad4c7416b46a728ef (patch) | |
tree | 6f49cc805068655b1159d4e5e81abd12bce0671e | |
parent | dde4ba04e57502f13955002d3ea3ae702c3e8c74 (diff) | |
download | extra-cmake-modules-5.19.0.tar.gz extra-cmake-modules-5.19.0.tar.bz2 |
Add test for ECMAddAppIcon.v5.19.0-rc1v5.19.0
REVIEW: 126711
-rw-r--r-- | tests/CMakeLists.txt | 9 | ||||
-rw-r--r-- | tests/ECMAddAppIconTest/128-category-name.png | bin | 0 -> 1860 bytes | |||
-rw-r--r-- | tests/ECMAddAppIconTest/16-category-name.png | bin | 0 -> 146 bytes | |||
-rw-r--r-- | tests/ECMAddAppIconTest/CMakeLists.txt | 24 | ||||
-rw-r--r-- | tests/ECMAddAppIconTest/check_files.cmake.in | 9 |
5 files changed, 42 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index afb825cc..a3fbe2e0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -121,6 +121,15 @@ endif() add_test_macro(FindModules dummy) add_test_macro(UseFindModules dummy) +set(ECMAddAppIconTest_EXTRA_OPTIONS + --build-target all + --build-options + "-DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_CURRENT_BINARY_DIR}/ECMAddAppIconTest/InstallDirectory" +) +add_test_macro(ECMAddAppIconTest + ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/ECMAddAppIconTest/check_files.cmake" +) + set(ECMInstallIconsTest_EXTRA_OPTIONS --build-target install --build-options diff --git a/tests/ECMAddAppIconTest/128-category-name.png b/tests/ECMAddAppIconTest/128-category-name.png Binary files differnew file mode 100644 index 00000000..715218d9 --- /dev/null +++ b/tests/ECMAddAppIconTest/128-category-name.png diff --git a/tests/ECMAddAppIconTest/16-category-name.png b/tests/ECMAddAppIconTest/16-category-name.png Binary files differnew file mode 100644 index 00000000..c60150f8 --- /dev/null +++ b/tests/ECMAddAppIconTest/16-category-name.png diff --git a/tests/ECMAddAppIconTest/CMakeLists.txt b/tests/ECMAddAppIconTest/CMakeLists.txt new file mode 100644 index 00000000..91da97ac --- /dev/null +++ b/tests/ECMAddAppIconTest/CMakeLists.txt @@ -0,0 +1,24 @@ +project(ECMAddAppIconTest) +cmake_minimum_required(VERSION 2.8.12) + +set(CMAKE_MODULE_PATH + ${CMAKE_CURRENT_SOURCE_DIR}/../../modules + ${CMAKE_CURRENT_SOURCE_DIR}/../../find-modules +) + +include(ECMAddAppIcon) + +set(ICONS 16-category-name.png 128-category-name.png) + +ecm_add_app_icon(OUT ICONS ${ICONS}) + +if(WIN32 OR APPLE) + if(${OUT} STREQUAL "") + message(FATAL_ERROR "ecm_add_app_icon() haven't produced anything") + endif() +endif() + +add_custom_target(t ALL DEPENDS ${OUT}) + +# this will be run by CTest +configure_file(check_files.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/check_files.cmake" @ONLY) diff --git a/tests/ECMAddAppIconTest/check_files.cmake.in b/tests/ECMAddAppIconTest/check_files.cmake.in new file mode 100644 index 00000000..e7beb272 --- /dev/null +++ b/tests/ECMAddAppIconTest/check_files.cmake.in @@ -0,0 +1,9 @@ +set(FILES "@OUT@") + +if(WIN32 OR APPLE) +foreach(f ${FILES}) + if(NOT EXISTS "${f}") + message(SEND_ERROR "${f} was not found") + endif() +endforeach() +endif()
\ No newline at end of file |