[Cmake-commits] CMake branch, next, updated. v3.4.2-2057-g935a413

Brad King brad.king at kitware.com
Wed Jan 20 13:54:09 EST 2016


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  935a4133753eb587b9b91a6b78832430ff780680 (commit)
       via  192c112d45399fd5e35fd89ec71d70320ad81bbf (commit)
      from  c7234a805cc4624901928f08d0507764d7290f18 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=935a4133753eb587b9b91a6b78832430ff780680
commit 935a4133753eb587b9b91a6b78832430ff780680
Merge: c7234a8 192c112
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 20 13:54:08 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Jan 20 13:54:08 2016 -0500

    Merge topic 'FindPNG-imported-targets' into next
    
    192c112d Revert "FindPNG: Create an imported PNG::PNG target (#15911)"


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=192c112d45399fd5e35fd89ec71d70320ad81bbf
commit 192c112d45399fd5e35fd89ec71d70320ad81bbf
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 20 13:53:41 2016 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 20 13:53:41 2016 -0500

    Revert "FindPNG: Create an imported PNG::PNG target (#15911)"
    
    This reverts commit 9451ea5a6a55f0e46ad68cd622e05a130ca0988f.
    This will be revised after on-list reviews and restored later.

diff --git a/Help/release/dev/FindPNG-imported-targets.rst b/Help/release/dev/FindPNG-imported-targets.rst
deleted file mode 100644
index e0d0ab1..0000000
--- a/Help/release/dev/FindPNG-imported-targets.rst
+++ /dev/null
@@ -1,4 +0,0 @@
-FindPNG-imported-targets
-------------------------
-
-* The :module:`FindPNG` module now provides imported targets.
diff --git a/Modules/FindPNG.cmake b/Modules/FindPNG.cmake
index 4eb3b86..7cf3f22 100644
--- a/Modules/FindPNG.cmake
+++ b/Modules/FindPNG.cmake
@@ -2,20 +2,13 @@
 # FindPNG
 # -------
 #
-# Find libpng, the official reference library for the PNG image format.
+# Find the native PNG includes and library
 #
-# Imported targets
-# ^^^^^^^^^^^^^^^^
 #
-# This module defines the following :prop_tgt:`IMPORTED` target:
 #
-# ``PNG::PNG``
-#   The libpng library, if found.
+# This module searches libpng, the library for working with PNG images.
 #
-# Result variables
-# ^^^^^^^^^^^^^^^^
-#
-# This module will set the following variables in your project:
+# It defines the following variables
 #
 # ``PNG_INCLUDE_DIRS``
 #   where to find png.h, etc.
@@ -29,22 +22,19 @@
 # ``PNG_VERSION_STRING``
 #   the version of the PNG library found (since CMake 2.8.8)
 #
-# Obsolete variables
-# ^^^^^^^^^^^^^^^^^^
-#
-# The following variables may also be set, for backwards compatibility:
+# Also defined, but not for general use are
 #
 # ``PNG_LIBRARY``
 #   where to find the PNG library.
-# ``PNG_INCLUDE_DIR``
-#   where to find the PNG headers (same as PNG_INCLUDE_DIRS)
+#
+# For backward compatiblity the variable PNG_INCLUDE_DIR is also set.
+# It has the same value as PNG_INCLUDE_DIRS.
 #
 # Since PNG depends on the ZLib compression library, none of the above
 # will be defined unless ZLib can be found.
 
 #=============================================================================
 # Copyright 2002-2009 Kitware, Inc.
-# Copyright 2016 Raumfeld
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
@@ -115,32 +105,6 @@ if(ZLIB_FOUND)
         endif()
       endif ()
 
-      if(NOT TARGET PNG::PNG)
-        add_library(PNG::PNG UNKNOWN IMPORTED)
-        set_target_properties(PNG::PNG PROPERTIES
-          INTERFACE_COMPILE_DEFINITIONS "${PNG_DEFINITIONS}"
-          INTERFACE_INCLUDE_DIRECTORIES "${PNG_INCLUDE_DIRS}"
-          INTERFACE_LIBRARIES "${PNG_LIBRARIES}")
-        if(EXISTS "${PNG_LIBRARY}")
-          set_target_properties(PNG::PNG PROPERTIES
-            IMPORTED_LINK_INTERFACE_LANGUAGES "C"
-            IMPORTED_LOCATION "${PNG_LIBRARY}")
-        endif()
-        if(EXISTS "${PNG_LIBRARY_DEBUG}")
-          set_property(TARGET PNG::PNG APPEND PROPERTY
-            IMPORTED_CONFIGURATIONS DEBUG)
-          set_target_properties(PNG::PNG PROPERTIES
-            IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG "C"
-            IMPORTED_LOCATION_DEBUG "${PNG_LIBRARY_DEBUG}")
-        endif()
-        if(EXISTS "${PNG_LIBRARY_RELEASE}")
-          set_property(TARGET PNG::PNG APPEND PROPERTY
-            IMPORTED_CONFIGURATIONS RELEASE)
-          set_target_properties(PNG::PNG PROPERTIES
-            IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
-            IMPORTED_LOCATION_RELEASE "${PNG_LIBRARY_RELEASE}")
-        endif()
-      endif()
   endif ()
 
   if (PNG_PNG_INCLUDE_DIR AND EXISTS "${PNG_PNG_INCLUDE_DIR}/png.h")
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 3cca77b..043b757 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1375,10 +1375,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
     add_subdirectory(FindOpenSSL)
   endif()
 
-  if(CMake_TEST_FindPNG)
-    add_subdirectory(FindPNG)
-  endif()
-
   if(CMake_TEST_FindTIFF)
     add_subdirectory(FindTIFF)
   endif()
diff --git a/Tests/FindPNG/CMakeLists.txt b/Tests/FindPNG/CMakeLists.txt
deleted file mode 100644
index c665b67..0000000
--- a/Tests/FindPNG/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-add_test(NAME FindPNG.Test COMMAND
-  ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>
-  --build-and-test
-  "${CMake_SOURCE_DIR}/Tests/FindPNG/Test"
-  "${CMake_BINARY_DIR}/Tests/FindPNG/Test"
-  ${build_generator_args}
-  --build-project TestFindPNG
-  --build-options ${build_options}
-  --test-command ${CMAKE_CTEST_COMMAND} -V -C $<CONFIGURATION>
-  )
diff --git a/Tests/FindPNG/Test/CMakeLists.txt b/Tests/FindPNG/Test/CMakeLists.txt
deleted file mode 100644
index ad50011..0000000
--- a/Tests/FindPNG/Test/CMakeLists.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-cmake_minimum_required(VERSION 3.4)
-project(TestFindPNG C)
-include(CTest)
-
-find_package(PNG REQUIRED)
-
-add_definitions(-DCMAKE_EXPECTED_PNG_VERSION="${PNG_VERSION_STRING}")
-
-add_executable(test_tgt main.c)
-target_link_libraries(test_tgt PNG::PNG)
-add_test(NAME test_tgt COMMAND test_tgt)
-
-add_executable(test_var main.c)
-target_include_directories(test_var PRIVATE ${PNG_INCLUDE_DIRS})
-target_link_libraries(test_var PRIVATE ${PNG_LIBRARIES})
-add_test(NAME test_var COMMAND test_var)
diff --git a/Tests/FindPNG/Test/main.c b/Tests/FindPNG/Test/main.c
deleted file mode 100644
index 27e1478..0000000
--- a/Tests/FindPNG/Test/main.c
+++ /dev/null
@@ -1,20 +0,0 @@
-#include <assert.h>
-#include <string.h>
-#include <png.h>
-
-int main()
-{
-  png_uint_32 png_version;
-  char png_version_string[16];
-
-  png_version = png_access_version_number ();
-
-  snprintf (png_version_string, 16, "%i.%i.%i",
-            png_version / 10000,
-            (png_version % 10000) / 100,
-            png_version % 100);
-
-  assert (strcmp(png_version_string, CMAKE_EXPECTED_PNG_VERSION) == 0);
-
-  return 0;
-}

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

Summary of changes:
 Help/release/dev/FindPNG-imported-targets.rst |    4 --
 Modules/FindPNG.cmake                         |   50 ++++---------------------
 Tests/CMakeLists.txt                          |    4 --
 Tests/FindPNG/CMakeLists.txt                  |   10 -----
 Tests/FindPNG/Test/CMakeLists.txt             |   16 --------
 Tests/FindPNG/Test/main.c                     |   20 ----------
 6 files changed, 7 insertions(+), 97 deletions(-)
 delete mode 100644 Help/release/dev/FindPNG-imported-targets.rst
 delete mode 100644 Tests/FindPNG/CMakeLists.txt
 delete mode 100644 Tests/FindPNG/Test/CMakeLists.txt
 delete mode 100644 Tests/FindPNG/Test/main.c


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list