Revision: 77579
          http://sourceforge.net/p/brlcad/code/77579
Author:   starseeker
Date:     2020-10-23 02:30:56 +0000 (Fri, 23 Oct 2020)
Log Message:
-----------
Pull in libpng CMake adjustments

Modified Paths:
--------------
    brlcad/branches/extbuild/src/other/ext/png/CMakeLists.txt

Modified: brlcad/branches/extbuild/src/other/ext/png/CMakeLists.txt
===================================================================
--- brlcad/branches/extbuild/src/other/ext/png/CMakeLists.txt   2020-10-23 
02:28:18 UTC (rev 77578)
+++ brlcad/branches/extbuild/src/other/ext/png/CMakeLists.txt   2020-10-23 
02:30:56 UTC (rev 77579)
@@ -19,18 +19,7 @@
 # and license in png.h
 
 cmake_minimum_required(VERSION 3.14)
-cmake_policy(VERSION 3.1)
 
-# Use new variable expansion policy.
-if (POLICY CMP0053)
-  cmake_policy(SET CMP0053 NEW)
-endif(POLICY CMP0053)
-if (POLICY CMP0054)
-  cmake_policy(SET CMP0054 NEW)
-endif(POLICY CMP0054)
-
-set(CMAKE_CONFIGURATION_TYPES "Release;Debug;MinSizeRel;RelWithDebInfo")
-
 project(libpng C)
 enable_testing()
 
@@ -41,9 +30,16 @@
 set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
 
 # needed packages
-  find_package(ZLIB REQUIRED)
-  include_directories(${ZLIB_INCLUDE_DIRS})
+if (Z_PREFIX)
+  add_definitions(-DZ_PREFIX)
+endif (Z_PREFIX)
+if (Z_PREFIX_STR)
+  add_definitions(-DZ_PREFIX_STR=${Z_PREFIX_STR})
+endif (Z_PREFIX_STR)
 
+find_package(ZLIB REQUIRED)
+include_directories(${ZLIB_INCLUDE_DIRS})
+
 if(UNIX AND NOT APPLE AND NOT BEOS AND NOT HAIKU)
   find_library(M_LIBRARY m)
 else()
@@ -70,7 +66,7 @@
 endif (NOT DEFINED PNG_LIB_NAME)
 
 # to distinguish between debug and release lib
-set(CMAKE_DEBUG_POSTFIX "d")
+#set(CMAKE_DEBUG_POSTFIX "d")
 
 include(CheckCSourceCompiles)
 option(ld-version-script "Enable linker version script" ON)
@@ -374,11 +370,6 @@
   set(PNG_LIB_TARGETS png)
   set_target_properties(png PROPERTIES OUTPUT_NAME ${PNG_LIB_NAME})
   add_dependencies(png genfiles)
-  if(MSVC)
-    # msvc does not append 'lib' - do it here to have consistent name
-    set_target_properties(png PROPERTIES PREFIX "lib")
-    set_target_properties(png PROPERTIES IMPORT_PREFIX "lib")
-  endif()
   target_link_libraries(png ${ZLIB_LIBRARIES} ${M_LIBRARY})
 
   if(UNIX AND AWK)
@@ -410,10 +401,6 @@
       CLEAN_DIRECT_OUTPUT 1)
   endif()
   list(APPEND PNG_LIB_TARGETS png_static)
-  if(MSVC)
-    # msvc does not append 'lib' - do it here to have consistent name
-    set_target_properties(png_static PROPERTIES PREFIX "lib")
-  endif()
   target_link_libraries(png_static ${ZLIB_LIBRARIES} ${M_LIBRARY})
 endif()
 
@@ -591,7 +578,6 @@
 endif()
 
 if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
-  message("got here?????")
   install(FILES ${libpng_public_hdrs} DESTINATION include)
   install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
 endif()

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to