Merge pull request #25257 from Kumataro:fix25256

3rdparty: libtiff: fix for small version expression problems for built-in tiff460 #25257

Close #25256

1. fix to show build-int libtiff version
2. fix to set value of LIBTIFF_VERSION define.

(RELEASE-DATE file coms from original libtiff 4.6.0)

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Kumataro 2024-03-25 14:58:30 +09:00 committed by GitHub
parent 52f3f5a3f6
commit aae77b65a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 8 deletions

View File

@ -361,6 +361,7 @@ set(LIBTIFF_MAJOR_VERSION "4")
set(LIBTIFF_MINOR_VERSION "6") set(LIBTIFF_MINOR_VERSION "6")
set(LIBTIFF_MICRO_VERSION "0") set(LIBTIFF_MICRO_VERSION "0")
set(LIBTIFF_VERSION "${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}") set(LIBTIFF_VERSION "${LIBTIFF_MAJOR_VERSION}.${LIBTIFF_MINOR_VERSION}.${LIBTIFF_MICRO_VERSION}")
file(READ "RELEASE-DATE" LIBTIFF_RELEASE_DATE content)
set(TIFF_MAX_DIR_COUNT "1048576") set(TIFF_MAX_DIR_COUNT "1048576")
@ -427,7 +428,7 @@ set(lib_srcs
tiff.h tiff.h
tiffio.h tiffio.h
tiffiop.h tiffiop.h
tiffvers.h "${CMAKE_CURRENT_BINARY_DIR}/tiffvers.h"
uvcode.h uvcode.h
tiffio.hxx tiffio.hxx
"${CMAKE_CURRENT_BINARY_DIR}/tif_config.h" "${CMAKE_CURRENT_BINARY_DIR}/tif_config.h"

1
3rdparty/libtiff/RELEASE-DATE vendored Normal file
View File

@ -0,0 +1 @@
20230908

View File

@ -124,13 +124,13 @@ if(WITH_TIFF)
endif() endif()
if(NOT TIFF_VERSION_STRING AND TIFF_INCLUDE_DIR) if(NOT TIFF_VERSION_STRING AND TIFF_INCLUDE_DIR)
list(GET TIFF_INCLUDE_DIR 0 _TIFF_INCLUDE_DIR) foreach(_TIFF_INCLUDE_DIR IN LISTS TIFF_INCLUDE_DIR)
if(EXISTS "${_TIFF_INCLUDE_DIR}/tiffvers.h") if(EXISTS "${_TIFF_INCLUDE_DIR}/tiffvers.h")
file(STRINGS "${_TIFF_INCLUDE_DIR}/tiffvers.h" tiff_version_str REGEX "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version .*") file(STRINGS "${_TIFF_INCLUDE_DIR}/tiffvers.h" tiff_version_str REGEX "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version .*")
string(REGEX REPLACE "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version +([^ \\n]*).*" "\\1" TIFF_VERSION_STRING "${tiff_version_str}") string(REGEX REPLACE "^#define[\t ]+TIFFLIB_VERSION_STR[\t ]+\"LIBTIFF, Version +([^ \\n]*).*" "\\1" TIFF_VERSION_STRING "${tiff_version_str}")
unset(tiff_version_str) unset(tiff_version_str)
endif() endif()
unset(_TIFF_INCLUDE_DIR) endforeach()
endif() endif()
set(HAVE_TIFF YES) set(HAVE_TIFF YES)