[Cmake-commits] CMake branch, next, updated. v2.8.11.2-4204-g453bd99

Brad King brad.king at kitware.com
Mon Sep 16 08:58:01 EDT 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  453bd992617f5c4b926918c760d471aa2215b930 (commit)
       via  68160448b9f725668b5e18390bc9ab15fe99e1a9 (commit)
      from  fc11c1c6f39da34c5ca0eb6af63c7852f9f2904c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=453bd992617f5c4b926918c760d471aa2215b930
commit 453bd992617f5c4b926918c760d471aa2215b930
Merge: fc11c1c 6816044
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Sep 16 08:57:59 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 16 08:57:59 2013 -0400

    Merge topic 'FindPNG-compatibility' into next
    
    6816044 FindPNG: Honor old PNG_LIBRARY if provided (#14398)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=68160448b9f725668b5e18390bc9ab15fe99e1a9
commit 68160448b9f725668b5e18390bc9ab15fe99e1a9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 13 11:52:48 2013 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 13 11:54:31 2013 -0400

    FindPNG: Honor old PNG_LIBRARY if provided (#14398)
    
    In commit 2a797539 (FindPNG: improve library detection, 2013-07-27) we
    split the search for PNG into separate PNG_LIBRARY_DEBUG and
    PNG_LIBRARY_RELEASE variables.  However, if a project or user sets the
    old PNG_LIBRARY value we must honor it instead of searching.
    
    While at it, mark PNG_LIBRARY_RELEASE and PNG_LIBRARY_DEBUG as advanced
    and remove a stray debug message.

diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 33c2971..a2577d2 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -58,15 +58,19 @@ if(ZLIB_FOUND)
     list(APPEND PNG_NAMES png${v} libpng${v})
     list(APPEND PNG_NAMES_DEBUG png${v}d libpng${v}d)
   endforeach()
-message(STATUS "PNG r: ${PNG_NAMES} d: ${PNG_NAMES_DEBUG}")
   unset(_PNG_VERSION_SUFFIXES)
-  find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
-  find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
+  # For compatiblity with versions prior to this multi-config search, honor
+  # any PNG_LIBRARY that is already specified and skip the search.
+  if(NOT PNG_LIBRARY)
+    find_library(PNG_LIBRARY_RELEASE NAMES ${PNG_NAMES})
+    find_library(PNG_LIBRARY_DEBUG NAMES ${PNG_NAMES_DEBUG})
+    include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+    select_library_configurations(PNG)
+    mark_as_advanced(PNG_LIBRARY_RELEASE PNG_LIBRARY_DEBUG)
+  endif()
   unset(PNG_NAMES)
   unset(PNG_NAMES_DEBUG)
 
-  include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
-  select_library_configurations(PNG)
   # Set by select_library_configurations(), but we want the one from
   # find_package_handle_standard_args() below.
   unset(PNG_FOUND)

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindPNG.cmake |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list