Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main Repositories
otb
Commits
ab19bd39
Commit
ab19bd39
authored
5 months ago
by
Thibaut ROMAIN
Browse files
Options
Downloads
Patches
Plain Diff
COMP: update libpng
parent
80f8b736
No related branches found
Branches containing commit
No related tags found
1 merge request
!528
Support of ITK 5.x in OTB
Pipeline
#16223
failed
5 months ago
Stage: precheck
Stage: prepare
Stage: build
Stage: report
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SuperBuild/CMake/External_png.cmake
+1
-4
1 addition, 4 deletions
SuperBuild/CMake/External_png.cmake
SuperBuild/patches/PNG/png-1-fixes-all.diff
+0
-106
0 additions, 106 deletions
SuperBuild/patches/PNG/png-1-fixes-all.diff
with
1 addition
and
110 deletions
SuperBuild/CMake/External_png.cmake
+
1
−
4
View file @
ab19bd39
...
...
@@ -38,11 +38,10 @@ ExternalProject_Add(PNG
DEPENDS
${
PNG_DEPENDENCIES
}
CMAKE_CACHE_ARGS
${
SB_CMAKE_CACHE_ARGS
}
-D
PNG_BUILD_ZLIB:BOOL=ON
-D
ZLIB_ROOT:PATH=
${
SB_INSTALL_PREFIX
}
-DPNG_STATIC:BOOL=OFF
-DPNG_SHARED:BOOL=ON
-DPNG_TESTS:BOOL=OFF
-DVERSIONED_OUTPUT_LIB:BOOL=OFF
-DSKIP_INSTALL_FILES:BOOL=ON
-DSKIP_INSTALL_EXPORT:BOOL=ON
-DSKIP_INSTALL_EXECUTABLES:BOOL=OFF
...
...
@@ -56,6 +55,4 @@ ExternalProject_Add(PNG
)
set
(
_SB_PNG_PNG_INCLUDE_DIR
${
SB_INSTALL_PREFIX
}
/include
)
SUPERBUILD_PATCH_SOURCE
(
PNG
)
SUPERBUILD_UPDATE_CMAKE_VARIABLES
(
PNG TRUE
)
This diff is collapsed.
Click to expand it.
SuperBuild/patches/PNG/png-1-fixes-all.diff
deleted
100644 → 0
+
0
−
106
View file @
80f8b736
diff -burN libpng-1.6.37.orig/CMakeLists.txt libpng-1.6.37/CMakeLists.txt
--- libpng-1.6.37.orig/CMakeLists.txt 2019-04-14 20:10:32.000000000 +0200
+++ libpng-1.6.37/CMakeLists.txt 2021-04-23 10:10:21.560899662 +0200
@@ -27,7 +27,16 @@
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 37)
-set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
+
+option(VERSIONED_OUTPUT_LIB "create output library with major.minor suffix" OFF)
+
+set(PNGLIB_NAME libpng)
+set(PNG_LIB_NAME png)
+if(VERSIONED_OUTPUT_LIB)
+ set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
+ set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
+endif()
+
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
include(GNUInstallDirs)
@@ -196,11 +205,9 @@
endif(PNG_HARDWARE_OPTIMIZATIONS)
-# SET LIBNAME
-set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# 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)
@@ -525,7 +532,6 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
unset(PNG_LIB_TARGETS)
-
if(PNG_SHARED)
add_library(png SHARED ${libpng_sources})
set(PNG_LIB_TARGETS png)
@@ -838,9 +844,8 @@
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(png PROPERTIES
-# VERSION 16.${PNGLIB_RELEASE}.1.6.37
- VERSION 16.${PNGLIB_RELEASE}.0
- SOVERSION 16
+ VERSION ${PNGLIB_VERSION}
+ SOVERSION ${PNGLIB_MAJOR}
CLEAN_DIRECT_OUTPUT 1)
endif()
@@ -852,29 +857,30 @@
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
FRAMEWORK DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ if(VERSIONED_OUTPUT_LIB)
+ if(PNG_SHARED)
+ # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
+ if(CYGWIN OR MINGW)
+ create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
+ install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
- if(PNG_SHARED)
- # Create a symlink for libpng.dll.a => libpng16.dll.a on Cygwin
- if(CYGWIN OR MINGW)
- create_symlink(libpng${CMAKE_IMPORT_LIBRARY_SUFFIX} TARGET png)
- install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endif()
-
- if(NOT WIN32)
- create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png)
- install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endif()
- endif()
+ if(NOT WIN32)
+ create_symlink(libpng${CMAKE_SHARED_LIBRARY_SUFFIX} TARGET png)
+ install(FILES $<TARGET_LINKER_FILE_DIR:png>/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ endif(PNG_SHARED)
- if(PNG_STATIC)
- if(NOT WIN32 OR CYGWIN OR MINGW)
- create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
- install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
- DESTINATION ${CMAKE_INSTALL_LIBDIR})
- endif()
- endif()
+ if(PNG_STATIC)
+ if(NOT WIN32 OR CYGWIN OR MINGW)
+ create_symlink(libpng${CMAKE_STATIC_LIBRARY_SUFFIX} TARGET png_static)
+ install(FILES $<TARGET_LINKER_FILE_DIR:png_static>/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ endif()
+ endif(PNG_STATIC)
+ endif(VERSIONED_OUTPUT_LIB)
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment