Hello community,

here is the log from the commit of package extra-cmake-modules for 
openSUSE:Factory checked in at 2018-08-24 16:50:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/extra-cmake-modules (Old)
 and      /work/SRC/openSUSE:Factory/.extra-cmake-modules.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "extra-cmake-modules"

Fri Aug 24 16:50:51 2018 rev:56 rq:630581 version:5.49.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/extra-cmake-modules/extra-cmake-modules.changes  
2018-07-21 10:11:18.547155510 +0200
+++ 
/work/SRC/openSUSE:Factory/.extra-cmake-modules.new/extra-cmake-modules.changes 
    2018-08-24 16:51:48.921199500 +0200
@@ -1,0 +2,14 @@
+Sun Aug 19 09:18:42 UTC 2018 - [email protected]
+
+- Update to 5.49.0
+  * New feature release
+  * For more details please see:
+  * https://www.kde.org/announcements/kde-frameworks-5.49.0.php
+- Changes since 5.48.0:
+  * Android: Don't hardcode a random version of the Android SDK
+  * ECMOptionalAddSubdirectory: Provide a bit more detail
+  * Fix variable definition check
+  * Change the 'since' version.
+  * Improve ECMAddAppIconMacro.
+
+-------------------------------------------------------------------

Old:
----
  extra-cmake-modules-5.48.0.tar.xz

New:
----
  extra-cmake-modules-5.49.0.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ extra-cmake-modules.spec ++++++
--- /var/tmp/diff_new_pack.ifquIQ/_old  2018-08-24 16:51:49.469200147 +0200
+++ /var/tmp/diff_new_pack.ifquIQ/_new  2018-08-24 16:51:49.469200147 +0200
@@ -16,7 +16,7 @@
 #
 
 
-%define _tar_path 5.48
+%define _tar_path 5.49
 # Full KF5 version (e.g. 5.33.0)
 %{!?_kf5_version: %global _kf5_version %{version}}
 # Last major and minor KF5 version (e.g. 5.33)
@@ -27,12 +27,12 @@
 %bcond_with doc
 %endif
 Name:           extra-cmake-modules
-Version:        5.48.0
+Version:        5.49.0
 Release:        0
 Summary:        CMake modules
 License:        BSD-3-Clause
 Group:          Development/Tools/Other
-Url:            
https://projects.kde.org/projects/kdesupport/extra-cmake-modules
+URL:            http://www.kde.org
 Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
 # PATCH-FIX-OPENSUSE
 Patch0:         bundle-lang.patch
@@ -57,8 +57,8 @@
 %package doc
 Summary:        Documentation for extra-cmake-modules
 Group:          Documentation/Other
-BuildArch:      noarch
 Requires:       %{name} = %{version}
+BuildArch:      noarch
 
 %description doc
 Extra modules and scripts for CMake.

++++++ extra-cmake-modules-5.48.0.tar.xz -> extra-cmake-modules-5.49.0.tar.xz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-cmake-modules-5.48.0/CMakeLists.txt 
new/extra-cmake-modules-5.49.0/CMakeLists.txt
--- old/extra-cmake-modules-5.48.0/CMakeLists.txt       2018-07-04 
17:04:12.000000000 +0200
+++ new/extra-cmake-modules-5.49.0/CMakeLists.txt       2018-08-04 
10:36:56.000000000 +0200
@@ -32,7 +32,7 @@
 # Preliminary setup
 #
 
-set(VERSION "5.48.0") # handled by release scripts
+set(VERSION "5.49.0") # handled by release scripts
 
 if (POLICY CMP0048)
     cmake_policy(SET CMP0048 NEW)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.48.0/docs/find-module/FindIcoTool.rst 
new/extra-cmake-modules-5.49.0/docs/find-module/FindIcoTool.rst
--- old/extra-cmake-modules-5.48.0/docs/find-module/FindIcoTool.rst     
1970-01-01 01:00:00.000000000 +0100
+++ new/extra-cmake-modules-5.49.0/docs/find-module/FindIcoTool.rst     
2018-08-04 10:36:56.000000000 +0200
@@ -0,0 +1 @@
+.. ecm-module:: ../../find-modules/FindIcoTool.cmake
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.48.0/find-modules/FindIcoTool.cmake 
new/extra-cmake-modules-5.49.0/find-modules/FindIcoTool.cmake
--- old/extra-cmake-modules-5.48.0/find-modules/FindIcoTool.cmake       
1970-01-01 01:00:00.000000000 +0100
+++ new/extra-cmake-modules-5.49.0/find-modules/FindIcoTool.cmake       
2018-08-04 10:36:56.000000000 +0200
@@ -0,0 +1,80 @@
+#.rst:
+# FindIcoTool
+# -----------
+#
+# Try to find icotool.
+#
+# If the icotool executable is not in your PATH, you can provide
+# an alternative name or full path location with the ``IcoTool_EXECUTABLE``
+# variable.
+#
+# This will define the following variables:
+#
+# ``IcoTool_FOUND``
+#     True if icotool is available.
+#
+# ``IcoTool_EXECUTABLE``
+#     The icotool executable.
+#
+# If ``IcoTool_FOUND`` is TRUE, it will also define the following imported
+# target:
+#
+# ``IcoTool::IcoTool``
+#     The icotool executable.
+#
+# Since 5.49.
+
+#=============================================================================
+# Copyright 2017 Vincent Pinon <[email protected]>
+# Copyright 2014 Alex Merry <[email protected]>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+# 3. The name of the author may not be used to endorse or promote products
+#    derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#=============================================================================
+
+include(${CMAKE_CURRENT_LIST_DIR}/ECMFindModuleHelpersStub.cmake)
+ecm_find_package_version_check(IcoTool)
+find_program(IcoTool_EXECUTABLE NAMES icotool)
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(IcoTool
+    FOUND_VAR
+        IcoTool_FOUND
+    REQUIRED_VARS
+        IcoTool_EXECUTABLE
+)
+mark_as_advanced(IcoTool_EXECUTABLE)
+
+if (IcoTool_FOUND)
+    if (NOT TARGET IcoTool::IcoTool)
+        add_executable(IcoTool::IcoTool IMPORTED)
+        set_target_properties(IcoTool::IcoTool PROPERTIES
+            IMPORTED_LOCATION "${IcoTool_EXECUTABLE}"
+        )
+    endif()
+endif()
+
+include(FeatureSummary)
+set_package_properties(IcoTool PROPERTIES
+    URL "http://www.nongnu.org/icoutils/";
+    DESCRIPTION "Executable that converts a collection of PNG files into a 
Windows icon file"
+)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.48.0/modules/ECMAddAppIcon.cmake 
new/extra-cmake-modules-5.49.0/modules/ECMAddAppIcon.cmake
--- old/extra-cmake-modules-5.48.0/modules/ECMAddAppIcon.cmake  2018-07-04 
17:04:12.000000000 +0200
+++ new/extra-cmake-modules-5.49.0/modules/ECMAddAppIcon.cmake  2018-08-04 
10:36:56.000000000 +0200
@@ -7,7 +7,10 @@
 # ::
 #
 #  ecm_add_app_icon(<sources_var>
-#                   ICONS <icon> [<icon> [...]])
+#                   ICONS <icon> [<icon> [...]]
+#                   [SIDEBAR_ICONS <icon> [<icon> [...]] # Since 5.49
+#                   [OUTFILE_BASENAME <name>]) # Since 5.49
+#                   )
 #
 # The given icons, whose names must match the pattern::
 #
@@ -22,12 +25,23 @@
 # ``<other_text>`` can be any other text. See the platform notes below for any
 # recommendations about icon sizes.
 #
+# ``SIDEBAR_ICONS`` can be used to add Mac OS X sidebar
+# icons to the generated iconset. They are used when a folder monitored by the
+# application is dragged into Finder's sidebar. Since 5.49.
+#
+# ``OUTFILE_BASENAME`` will be used as the basename for the icon file. If
+# you specify it, the icon file will be called ``<OUTFILE_BASENAME>.icns`` on 
Mac OS X
+# and ``<OUTFILE_BASENAME>.ico`` on Windows. If you don't specify it, it 
defaults
+# to ``<sources_var>.<ext>``. Since 5.49.
+#
+#
 # Windows notes
 #    * Icons are compiled into the executable using a resource file.
 #    * Icons may not show up in Windows Explorer if the executable
 #      target does not have the ``WIN32_EXECUTABLE`` property set.
-#    * The tool png2ico is required. See :find-module:`FindPng2Ico`.
-#    * Supported sizes: 16, 32, 48, 64, 128.
+#    * One of the tools png2ico (See :find-module:`FindPng2Ico`) or
+#      icotool (see :find-module:`FindIcoTool`) is required.
+#    * Supported sizes: 16, 24, 32, 48, 64, 128, 256, 512 and 1024.
 #
 # Mac OS X notes
 #    * The executable target must have the ``MACOSX_BUNDLE`` property set.
@@ -42,14 +56,18 @@
 #      "Retina" (high-resolution) displays. For example, a 32px icon, if
 #      provided, will be used as a 32px icon on standard-resolution displays,
 #      and as a 16px-equivalent icon (with an "@2x" tag) on high-resolution
-#      displays. ksvg2icns handles this internally.
+#      displays. That is why you should provide 64px and 1024px icons although
+#      they are not supported anymore directly. Instead they will be used as
+#      32px@2x and 512px@2x. ksvg2icns handles this internally.
 #    * This function sets the ``MACOSX_BUNDLE_ICON_FILE`` variable to the name
 #      of the generated icns file, so that it will be used as the
 #      ``MACOSX_BUNDLE_ICON_FILE`` target property when you call
 #      ``add_executable``.
+#    * Sidebar icons should typically provided in 16, 32, 64, 128 and 256px.
 #
 # Since 1.7.0.
 
+
 #=============================================================================
 # Copyright 2014 Alex Merry <[email protected]>
 # Copyright 2014 Ralf Habacker <[email protected]>
@@ -84,8 +102,8 @@
 
 function(ecm_add_app_icon appsources)
     set(options)
-    set(oneValueArgs)
-    set(multiValueArgs ICONS)
+    set(oneValueArgs OUTFILE_BASENAME)
+    set(multiValueArgs ICONS SIDEBAR_ICONS)
     cmake_parse_arguments(ARG "${options}" "${oneValueArgs}" 
"${multiValueArgs}" ${ARGN})
 
     if(NOT ARG_ICONS)
@@ -120,82 +138,70 @@
         endforeach()
     endif()
 
-    set(known_sizes 16 32 48 64 128 256 512 1024)
-    foreach(size ${known_sizes})
-        set(icons_at_${size}px)
-    endforeach()
 
-    foreach(icon ${ARG_ICONS})
-        get_filename_component(icon_full ${icon} ABSOLUTE)
-        if (NOT EXISTS "${icon_full}")
-            message(AUTHOR_WARNING "${icon_full} does not exist, ignoring")
-        else()
-            get_filename_component(icon_name ${icon} NAME)
-            string(REGEX MATCH "([0-9]+)\\-[^/]+\\.([a-z]+)$"
-                               _dummy "${icon_name}")
-            set(size  "${CMAKE_MATCH_1}")
-            set(ext   "${CMAKE_MATCH_2}")
-            if (NOT (ext STREQUAL "svg" OR ext STREQUAL "svgz"))
-                if (NOT size)
-                    message(AUTHOR_WARNING "${icon_full} is not named 
correctly for ecm_add_app_icon - ignoring")
-                elseif (NOT ext STREQUAL "png")
-                    message(AUTHOR_WARNING "${icon_full} is not a png file - 
ignoring")
-                else()
-                    list(FIND known_sizes "${size}" offset)
-                    if (offset GREATER -1)
-                        list(APPEND icons_at_${size}px "${icon_full}")
-                    endif()
-                endif()
-            endif()
-        endif()
-    endforeach()
+    _ecm_add_app_icon_categorize_icons("${ARG_ICONS}" "icons" 
"16;24;32;48;64;128;256;512;1024")
+    if(ARG_SIDEBAR_ICONS)
+        _ecm_add_app_icon_categorize_icons("${ARG_SIDEBAR_ICONS}" 
"sidebar_icons" "16;32;64;128;256")
+    endif()
 
-    set(mac_icons ${icons_at_16px}
+    set(mac_icons
+                  # Icons: 
https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
+                  ${icons_at_16px}
                   ${icons_at_32px}
                   ${icons_at_64px}
                   ${icons_at_128px}
                   ${icons_at_256px}
                   ${icons_at_512px}
                   ${icons_at_1024px})
-    if (NOT icons_at_128px)
-        message(AUTHOR_WARNING "No 128px icon provided; this will not work on 
Mac OS X")
+
+    set(mac_sidebar_icons
+                  # Sidebar Icons: 
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
+                  ${sidebar_icons_at_16px}
+                  ${sidebar_icons_at_32px}
+                  ${sidebar_icons_at_64px}
+                  ${sidebar_icons_at_128px}
+                  ${sidebar_icons_at_256px})
+
+    if (NOT (mac_icons OR mac_sidebar_icons))
+        message(AUTHOR_WARNING "No icons suitable for use on macOS provided")
     endif()
 
-    set(windows_icons ${icons_at_16px}
-                      ${icons_at_32px}
-                      ${icons_at_48px}
-                      ${icons_at_64px}
-                      ${icons_at_128px})
-    if (NOT windows_icons)
+
+    set(windows_icons_classic ${icons_at_16px}
+                              ${icons_at_24px}
+                              ${icons_at_32px}
+                              ${icons_at_48px}
+                              ${icons_at_64px}
+                              ${icons_at_128px})
+    set(windows_icons_modern  ${windows_icons_classic}
+                              ${icons_at_256px}
+                              ${icons_at_512px}
+                              ${icons_at_1024px})
+
+    if (NOT (windows_icons_modern OR windows_icons_classic))
         message(AUTHOR_WARNING "No icons suitable for use on Windows provided")
     endif()
 
-    set (_outfilename "${CMAKE_CURRENT_BINARY_DIR}/${appsources}")
+    if (ARG_OUTFILE_BASENAME)
+        set (_outfilebasename "${ARG_OUTFILE_BASENAME}")
+    else()
+        set (_outfilebasename "${appsources}")
+    endif()
+    set (_outfilename "${CMAKE_CURRENT_BINARY_DIR}/${_outfilebasename}")
 
-    if (WIN32 AND windows_icons)
+    if (WIN32 AND (windows_icons_modern OR windows_icons_classic))
         set(saved_CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH}")
         set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_FIND_MODULE_DIR})
         find_package(Png2Ico)
+        find_package(IcoTool)
         set(CMAKE_MODULE_PATH "${saved_CMAKE_MODULE_PATH}")
 
-        if (Png2Ico_FOUND)
-            if (Png2Ico_HAS_RCFILE_ARGUMENT)
-                add_custom_command(
-                    OUTPUT "${_outfilename}.rc" "${_outfilename}.ico"
-                    COMMAND Png2Ico::Png2Ico
-                    ARGS
-                        --rcfile "${_outfilename}.rc"
-                        "${_outfilename}.ico"
-                        ${windows_icons}
-                    DEPENDS ${windows_icons}
-                    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
-                )
-            else()
+        function(create_windows_icon_and_rc command args deps)
                 add_custom_command(
                     OUTPUT "${_outfilename}.ico"
-                    COMMAND Png2Ico::Png2Ico
-                    ARGS "${_outfilename}.ico" ${windows_icons}
-                    DEPENDS ${windows_icons}
+                    COMMAND ${command}
+                    ARGS ${args}
+                    DEPENDS ${deps}
                     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
                 )
                 # this bit's a little hacky to make the dependency stuff work
@@ -207,12 +213,67 @@
                     DEPENDS "${_outfilename}.ico"
                     WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
                 )
-            endif()
+        endfunction()
+
+        if (IcoTool_FOUND)
+            list(APPEND icotool_args "-c" "-o" "${_outfilename}.ico")
+
+            # According to https://stackoverflow.com/a/40851713/2886832
+            # Windows always chooses the first icon above 255px, all other 
ones will be ignored
+            set(maxSize 0)
+            foreach(size 256 512 1024)
+                if(icons_at_${size}px)
+                    set(maxSize "${size}")
+                endif()
+            endforeach()
+
+            foreach(size 16 24 32 48 64 128 ${maxSize})
+                if(NOT icons_at_${size}px)
+                    continue()
+                endif()
+
+                set(icotool_icon_arg "")
+                if(size STREQUAL "${maxSize}")
+                    # maxSize icon needs to be included as raw png
+                    list(APPEND icotool_args "-r")
+                endif()
+
+                foreach(icon ${icons_at_${size}px})
+                    list(APPEND icotool_args "${icons_at_${size}px}")
+                endforeach()
+            endforeach()
+
+            create_windows_icon_and_rc(IcoTool::IcoTool "${icotool_args}" 
"${windows_icons_modern}")
+            set(${appsources} "${${appsources}};${_outfilename}.rc" 
PARENT_SCOPE)
+
+        # standard png2ico has no rcfile argument
+        elseif(Png2Ico_FOUND AND NOT Png2Ico_HAS_RCFILE_ARGUMENT AND 
windows_icons_classic)
+            set(png2ico_args)
+            list(APPEND png2ico_args "${_outfilename}.ico")
+            list(APPEND png2ico_args "${windows_icons_classic}")
+
+            create_windows_icon_and_rc(Png2Ico::Png2Ico "${png2ico_args}" 
"${windows_icons_classic}")
+            set(${appsources} "${${appsources}};${_outfilename}.rc" 
PARENT_SCOPE)
+
+        # png2ico from kdewin provides rcfile argument
+        elseif(Png2Ico_FOUND AND windows_icons_classic)
+            add_custom_command(
+                  OUTPUT "${_outfilename}.rc" "${_outfilename}.ico"
+                  COMMAND Png2Ico::Png2Ico
+                  ARGS
+                      --rcfile "${_outfilename}.rc"
+                      "${_outfilename}.ico"
+                      ${windows_icons_classic}
+                  DEPENDS ${windows_icons_classic}
+                  WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
+              )
+
             set(${appsources} "${${appsources}};${_outfilename}.rc" 
PARENT_SCOPE)
+        # else none of the supported tools was found
         else()
-            message(WARNING "Unable to find the png2ico utility - application 
will not have an application icon!")
+            message(WARNING "Unable to find the png2ico or icotool utilities 
or icons in matching sizes - application will not have an application icon!")
         endif()
-    elseif (APPLE AND mac_icons)
+    elseif (APPLE AND (mac_icons OR mac_sidebar_icons))
         # first generate .iconset directory structure, then convert to .icns 
format using the Mac OS X "iconutil" utility,
         # to create retina compatible icon, you need png source files in pixel 
resolution 16x16, 32x32, 64x64, 128x128,
         # 256x256, 512x512, 1024x1024
@@ -224,31 +285,55 @@
                 ARGS -E make_directory "${_outfilename}.iconset"
             )
             set(iconset_icons)
-            macro(copy_icon filename sizename)
+            macro(copy_icon filename sizename type)
                 add_custom_command(
-                    OUTPUT "${_outfilename}.iconset/icon_${sizename}.png"
+                    OUTPUT "${_outfilename}.iconset/${type}_${sizename}.png"
                     COMMAND ${CMAKE_COMMAND}
                     ARGS -E copy
                          "${filename}"
-                         "${_outfilename}.iconset/icon_${sizename}.png"
+                         "${_outfilename}.iconset/${type}_${sizename}.png"
                     DEPENDS
                         "${_outfilename}.iconset"
                         "${filename}"
                     WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
                 )
                 list(APPEND iconset_icons
-                            "${_outfilename}.iconset/icon_${sizename}.png")
+                        "${_outfilename}.iconset/${type}_${sizename}.png")
             endmacro()
-            foreach(size 16 32 64 128 256 512)
+
+            # List of supported sizes and filenames taken from:
+            # 
https://developer.apple.com/library/content/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Optimizing/Optimizing.html#//apple_ref/doc/uid/TP40012302-CH7-SW4
+            foreach(size 16 32 128 256 512)
                 math(EXPR double_size "2 * ${size}")
                 foreach(file ${icons_at_${size}px})
-                    copy_icon("${file}" "${size}x${size}")
+                    copy_icon("${file}" "${size}x${size}" "icon")
                 endforeach()
                 foreach(file ${icons_at_${double_size}px})
-                    copy_icon("${file}" "${size}x${size}@2x")
+                    copy_icon("${file}" "${size}x${size}@2x" "icon")
                 endforeach()
             endforeach()
 
+            # List of supported sizes and filenames taken from:
+            # 
https://developer.apple.com/library/content/documentation/General/Conceptual/ExtensibilityPG/Finder.html#//apple_ref/doc/uid/TP40014214-CH15-SW15
+            foreach(file ${sidebar_icons_at_16px})
+                copy_icon("${file}" "16x16" "sidebar")
+            endforeach()
+            foreach(file ${sidebar_icons_at_32px})
+                copy_icon("${file}" "16x16@2x" "sidebar")
+            endforeach()
+            foreach(file ${sidebar_icons_at_32px})
+                copy_icon("${file}" "18x18" "sidebar")
+            endforeach()
+            foreach(file ${sidebar_icons_at_64px})
+                copy_icon("${file}" "18x18@2x" "sidebar")
+            endforeach()
+            foreach(file ${sidebar_icons_at_128px})
+                copy_icon("${file}" "32x32" "sidebar")
+            endforeach()
+            foreach(file ${sidebar_icons_at_256px})
+                copy_icon("${file}" "32x32@2x" "sidebar")
+            endforeach()
+
             # generate .icns icon file
             add_custom_command(
                 OUTPUT "${_outfilename}.icns"
@@ -257,20 +342,58 @@
                     --convert icns
                     --output "${_outfilename}.icns"
                     "${_outfilename}.iconset"
-                DEPENDS ${iconset_icons}
+                DEPENDS "${iconset_icons}"
                 WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
             )
             # This will register the icon into the bundle
-            set(MACOSX_BUNDLE_ICON_FILE ${appsources}.icns PARENT_SCOPE)
+            set(MACOSX_BUNDLE_ICON_FILE "${_outfilebasename}.icns" 
PARENT_SCOPE)
 
             # Append the icns file to the sources list so it will be a 
dependency to the
             # main target
             set(${appsources} "${${appsources}};${_outfilename}.icns" 
PARENT_SCOPE)
 
             # Install the icon into the Resources dir in the bundle
-            set_source_files_properties(${_outfilename}.icns PROPERTIES 
MACOSX_PACKAGE_LOCATION Resources)
+            set_source_files_properties("${_outfilename}.icns" PROPERTIES 
MACOSX_PACKAGE_LOCATION Resources)
         else()
             message(STATUS "Unable to find the iconutil utility - application 
will not have an application icon!")
         endif()
     endif()
 endfunction()
+
+macro(_ecm_add_app_icon_categorize_icons icons type known_sizes)
+    set(_${type}_known_sizes)
+    foreach(size ${known_sizes})
+        set(${type}_at_${size}px)
+        list(APPEND _${type}_known_sizes ${size})
+    endforeach()
+
+
+    foreach(icon ${icons})
+        get_filename_component(icon_full ${icon} ABSOLUTE)
+        if (NOT EXISTS "${icon_full}")
+            message(AUTHOR_WARNING "${icon_full} does not exist, ignoring")
+        else()
+            get_filename_component(icon_name ${icon} NAME)
+            string(REGEX MATCH "([0-9]+)\\-[^/]+\\.([a-z]+)$"
+                               _dummy "${icon_name}")
+            set(size  "${CMAKE_MATCH_1}")
+            set(ext   "${CMAKE_MATCH_2}")
+
+            if (NOT (ext STREQUAL "svg" OR ext STREQUAL "svgz"))
+                if (NOT size)
+                    message(AUTHOR_WARNING "${icon_full} is not named 
correctly for ecm_add_app_icon - ignoring")
+                elseif (NOT ext STREQUAL "png")
+                    message(AUTHOR_WARNING "${icon_full} is not a png file - 
ignoring")
+                else()
+                    list(FIND _${type}_known_sizes ${size} offset)
+
+                    if (offset GREATER -1)
+                        list(APPEND ${type}_at_${size}px "${icon_full}")
+                    elseif()
+                        message(STATUS "not found ${type}_at_${size}px 
${icon_full}")
+                    endif()
+                endif()
+            endif()
+        endif()
+    endforeach()
+endmacro()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.48.0/modules/ECMOptionalAddSubdirectory.cmake 
new/extra-cmake-modules-5.49.0/modules/ECMOptionalAddSubdirectory.cmake
--- old/extra-cmake-modules-5.48.0/modules/ECMOptionalAddSubdirectory.cmake     
2018-07-04 17:04:12.000000000 +0200
+++ new/extra-cmake-modules-5.49.0/modules/ECMOptionalAddSubdirectory.cmake     
2018-08-04 10:36:56.000000000 +0200
@@ -10,7 +10,8 @@
 #
 # This behaves like add_subdirectory(), except that it does not complain if the
 # directory does not exist.  Additionally, if the directory does exist, it
-# creates an option to allow the user to skip it.
+# creates an option to allow the user to skip it. The option will be named
+# BUILD_<dir>.
 #
 # This is useful for "meta-projects" that combine several mostly-independent
 # sub-projects.
Binary files 
old/extra-cmake-modules-5.48.0/tests/ECMAddAppIconTest/128-category-name-sidebar.png
 and 
new/extra-cmake-modules-5.49.0/tests/ECMAddAppIconTest/128-category-name-sidebar.png
 differ
Binary files 
old/extra-cmake-modules-5.48.0/tests/ECMAddAppIconTest/16-category-name-sidebar.png
 and 
new/extra-cmake-modules-5.49.0/tests/ECMAddAppIconTest/16-category-name-sidebar.png
 differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.48.0/tests/ECMAddAppIconTest/CMakeLists.txt 
new/extra-cmake-modules-5.49.0/tests/ECMAddAppIconTest/CMakeLists.txt
--- old/extra-cmake-modules-5.48.0/tests/ECMAddAppIconTest/CMakeLists.txt       
2018-07-04 17:04:12.000000000 +0200
+++ new/extra-cmake-modules-5.49.0/tests/ECMAddAppIconTest/CMakeLists.txt       
2018-08-04 10:36:56.000000000 +0200
@@ -8,18 +8,57 @@
 
 include(ECMAddAppIcon)
 
-set(ICONS 16-category-name.png 128-category-name.png)
+if(WIN32)
+    set(icon_extension_to_test "rc")
+elseif(APPLE)
+    set(icon_extension_to_test "icns")
+endif()
+
+#### Test 1: ecm_add_app_icon with only regular icons and no OUTFILE_BASENAME 
####
+set(ICONS_1 16-category-name.png 128-category-name.png)
+ecm_add_app_icon(OUT_1 ICONS ${ICONS_1})
+
+if(WIN32 OR APPLE)
+    list(LENGTH OUT_1 out_count)
+    if(out_count EQUAL 0)
+        message(FATAL_ERROR "ecm_add_app_icon() hasn't produced anything")
+    endif()
+
+
+    if(NOT OUT_1 MATCHES "OUT_1.${icon_extension_to_test}")
+        message(FATAL_ERROR "ecm_add_app_icon() did not fall back to target 
name for icon name: ${OUT_1}")
+    endif()
+endif()
+
+add_custom_target(t_1 ALL DEPENDS ${OUT_1})
+list(APPEND OUT "${OUT_1}")
+
+#### Test 2: ecm_add_app_icon with regular and sidebar icons and 
OUTFILE_BASENAME set ####
+set(ICONS_2 16-category-name.png 128-category-name.png)
+set(SIDEBAR_ICONS_2 16-category-name-sidebar.png 128-category-name-sidebar.png)
 
-ecm_add_app_icon(OUT ICONS ${ICONS})
+ecm_add_app_icon(OUT_2 ICONS ${ICONS_2} SIDEBAR_ICONS ${SIDEBAR_ICONS_2} 
OUTFILE_BASENAME "SuperBasename")
 
 if(WIN32 OR APPLE)
-    list(LENGTH OUT out_count)
+    list(LENGTH OUT_2 out_count)
     if(out_count EQUAL 0)
-        message(FATAL_ERROR "ecm_add_app_icon() haven't produced anything")
+        message(FATAL_ERROR "ecm_add_app_icon() hasn't produced anything")
     endif()
+
+    if(NOT OUT_2 MATCHES "SuperBasename.${icon_extension_to_test}")
+        message(FATAL_ERROR "ecm_add_app_icon() did not respect 
OUTFILE_BASENAME: ${OUT_2}")
+    endif()
+endif()
+
+if(APPLE)
+    list(APPEND expected_icons "icon_16x16.png" "icon_128x128.png" 
"sidebar_16x16.png" "sidebar_32x32.png")
+    foreach(expected_icon ${expected_icons})
+        list(APPEND OUT_2 
"${CMAKE_CURRENT_BINARY_DIR}/SuperBasename.iconset/${expected_icon}")
+    endforeach()
 endif()
 
-add_custom_target(t ALL DEPENDS ${OUT})
+add_custom_target(t_2 ALL DEPENDS ${OUT_2})
+list(APPEND OUT "${OUT_2}")
 
-# this will be run by CTest
+#### this will be run by CTest ####
 configure_file(check_files.cmake.in 
"${CMAKE_CURRENT_BINARY_DIR}/check_files.cmake" @ONLY)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/extra-cmake-modules-5.48.0/tests/ECMAddAppIconTest/check_files.cmake.in 
new/extra-cmake-modules-5.49.0/tests/ECMAddAppIconTest/check_files.cmake.in
--- old/extra-cmake-modules-5.48.0/tests/ECMAddAppIconTest/check_files.cmake.in 
2018-07-04 17:04:12.000000000 +0200
+++ new/extra-cmake-modules-5.49.0/tests/ECMAddAppIconTest/check_files.cmake.in 
2018-08-04 10:36:56.000000000 +0200
@@ -6,4 +6,4 @@
         message(SEND_ERROR "${f} was not found")
     endif()
 endforeach()
-endif()
\ No newline at end of file
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/extra-cmake-modules-5.48.0/toolchain/Android.cmake 
new/extra-cmake-modules-5.49.0/toolchain/Android.cmake
--- old/extra-cmake-modules-5.48.0/toolchain/Android.cmake      2018-07-04 
17:04:12.000000000 +0200
+++ new/extra-cmake-modules-5.49.0/toolchain/Android.cmake      2018-08-04 
10:36:56.000000000 +0200
@@ -144,7 +144,7 @@
 
 macro(set_deprecated_variable actual_variable deprecated_variable 
default_value)
     set(${deprecated_variable} "${default_value}" CACHE STRING "Deprecated. 
Use ${actual_variable}")
-    if (NOT DEFINED ${${actual_variable}})
+    if (NOT DEFINED ${actual_variable})
         set(${actual_variable} ${${deprecated_variable}})
     endif()
 endmacro()
@@ -158,7 +158,10 @@
 set(ANDROID_SDK_ROOT "$ENV{ANDROID_SDK_ROOT}" CACHE path "Android SDK path")
 set(ANDROID_TOOLCHAIN "arm-linux-androideabi" CACHE string "Used SDK")
 set(ANDROID_COMPILER_PREFIX "arm-linux-androideabi" CACHE string "Prefix for 
gcc/g++/etc")
-set(ANDROID_SDK_BUILD_TOOLS_REVISION "21.1.1" CACHE string "Android API Level")
+
+file(GLOB build-tools LIST_DIRECTORIES TRUE RELATIVE 
${ANDROID_SDK_ROOT}/build-tools ${ANDROID_SDK_ROOT}/build-tools/*)
+list(GET build-tools 0 _default_sdk)
+set(ANDROID_SDK_BUILD_TOOLS_REVISION "${_default_sdk}" CACHE string "Android 
API Level")
 
 set(CMAKE_SYSTEM_VERSION ${CMAKE_ANDROID_API})
 set(CMAKE_SYSTEM_NAME Android)


Reply via email to