diff options
author | Even Rouault <even.rouault@spatialys.com> | 2021-12-29 14:06:47 +0000 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2021-12-29 14:06:47 +0000 |
commit | 115ee5251e61db6eedc3bb828c74ee99da9b2ed5 (patch) | |
tree | 3c2303b37eb9c4a9e41facb4309390bf595d901f | |
parent | 794790068951b5de272f2ac959679f9e4cd7836c (diff) | |
parent | 0784472a58374c7559c5dc74344c56df49ddeb18 (diff) | |
download | libtiff-git-115ee5251e61db6eedc3bb828c74ee99da9b2ed5.tar.gz |
Merge branch 'mingw-static' into 'master'
build: Fix static library imports in mingw
See merge request libtiff/libtiff!286
-rw-r--r-- | configure.ac | 8 | ||||
-rwxr-xr-x | libtiff/CMakeLists.txt | 3 | ||||
-rw-r--r-- | libtiff/Makefile.am | 8 |
3 files changed, 18 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index bfa395a1..248c14fa 100644 --- a/configure.ac +++ b/configure.ac @@ -649,6 +649,14 @@ dnl Check for liblerc. dnl --------------------------------------------------------------------------- HAVE_LERC=no +STATIC_LERC=no + +if test "$enable_static" = "no"; then + static_lerc=no +else + static_lerc=yes +fi +AM_CONDITIONAL([STATIC_LERC], [ test "$static_lerc" = yes ]) AC_ARG_ENABLE(lerc, AS_HELP_STRING([--disable-lerc], diff --git a/libtiff/CMakeLists.txt b/libtiff/CMakeLists.txt index 905f52ca..cf9d80c3 100755 --- a/libtiff/CMakeLists.txt +++ b/libtiff/CMakeLists.txt @@ -132,6 +132,9 @@ endif() if(LERC_SUPPORT) target_link_libraries(tiff PRIVATE LERC::LERC) list(APPEND tiff_libs_private_list "${LERC_LIBRARY}") + if(NOT BUILD_SHARED_LIBS) + set_target_properties(tiff PROPERTIES COMPILE_DEFINITIONS LERC_STATIC) + endif() endif() if(LZMA_SUPPORT) target_link_libraries(tiff PRIVATE LibLZMA::LibLZMA) diff --git a/libtiff/Makefile.am b/libtiff/Makefile.am index 44522b62..3988da76 100644 --- a/libtiff/Makefile.am +++ b/libtiff/Makefile.am @@ -147,4 +147,10 @@ mkg3states_LDADD = $(LIBPORT) faxtable: mkg3states (rm -f tif_fax3sm.c && ./mkg3states -b -c const tif_fax3sm.c) -AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port +if STATIC_LERC +extra_CPPFLAGS = -DLERC_STATIC +else +extra_CPPFLAGS = +endif + +AM_CPPFLAGS = -I$(top_srcdir)/libtiff -I$(top_srcdir)/port $(extra_CPPFLAGS) |