Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libgeotiff: add version 1.7.3, simplify patches #24156

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

toge
Copy link
Contributor

@toge toge commented May 29, 2024

Specify library name and version: libgeotiff/*

OSGeo/libgeotiff@1.7.1...1.7.3


AbrilRBS
AbrilRBS previously approved these changes May 29, 2024
Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@AbrilRBS AbrilRBS self-assigned this May 29, 2024
@conan-center-bot

This comment has been minimized.

Copy link
Contributor

Hooks produced the following warnings for commit 2f38b8b
libgeotiff/1.7.0@#e285816e0ab657ba8a20b64fdfafb424
post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libgeotiff.5.1.0.dylib, libgeotiff.dylib, libgeotiff.5.dylib
libgeotiff/1.6.0@#f1e46dd19f6a0827cca2be181631864f
post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libgeotiff.dylib, libgeotiff.5.0.1.dylib, libgeotiff.5.dylib

Copy link
Member

@AbrilRBS AbrilRBS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @toge thanks a lot for taking the time to add the new options, really appreciated!

Unfortunately for -o="&:with_tiff=False I'm getting some compilation errors which I'm hoping you have some insight into :)

Logs:

$ conan create . --version=1.7.3 -b=missing -o="&:with_tiff=False"

======== Exporting recipe to the cache ========
libgeotiff/1.7.3: Exporting package recipe: /Users/ruben/coding/conan-center-index/recipes/libgeotiff/all/conanfile.py
libgeotiff/1.7.3: exports: File 'conandata.yml' found. Exporting it...
libgeotiff/1.7.3: Calling export_sources()
libgeotiff/1.7.3: Copied 1 '.py' file: conanfile.py
libgeotiff/1.7.3: Copied 1 '.yml' file: conandata.yml
libgeotiff/1.7.3: Copied 1 '.patch' file: fix-cmake-1.7.3.patch
libgeotiff/1.7.3: Exported to cache folder: /Users/ruben/.conan2/p/libge008c9c886245c/e
libgeotiff/1.7.3: Exported: libgeotiff/1.7.3#b93db49c48934c76b3bd227eb1463e43 (2024-05-30 07:31:41 UTC)

======== Input profiles ========
Profile host:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos
[options]
&:with_tiff=False
[platform_tool_requires]
cmake/3.29.1
[conf]


Profile build:
[settings]
arch=armv8
build_type=Release
compiler=apple-clang
compiler.cppstd=gnu17
compiler.libcxx=libc++
compiler.version=15
os=Macos
[platform_tool_requires]
cmake/3.29.1
[conf]



======== Computing dependency graph ========
Graph root
    cli
Requirements
    jbig/20160605#2d29fa02aacd76902e0d2cbbc24631ef - Cache
    libcurl/8.6.0#752cd9c3df0e9487b72301862f15a965 - Cache
    libdeflate/1.19#3ea74a4549efc14d4b1202dc4bfbf602 - Cache
    libgeotiff/1.7.3#b93db49c48934c76b3bd227eb1463e43 - Cache
    libjpeg/9e#a794b5e74808992b08a21b126e19eab4 - Cache
    libtiff/4.6.0#51d0e7e15d032aeec1b64e65c44ecd9f - Cache
    libwebp/1.3.2#52f69c4a31c5cf033fdd9230d77a8e38 - Cache
    nlohmann_json/3.11.3#45828be26eb619a2e04ca517bb7b828d - Cache
    proj/9.3.1#da0fce97195990d35c992a45aeabe766 - Cache
    sqlite3/3.44.2#1f24f42c6c9b9122f7ee794c2a2a2078 - Cache
    xz_utils/5.4.5#51e5a6e6564f4ea3afd79def01f035ad - Cache
    zlib/1.3.1#f52e03ae3d251dec704634230cd806a2 - Cache
    zstd/1.5.5#1f239731dc45147c7fc2f54bfbde73df - Cache
Build requirements
    autoconf/2.71#f9307992909d7fb3df459340f1932809 - Cache
    automake/1.16.5#058bda3e21c36c9aa8425daf3c1faf50 - Cache
    cmake/3.29.1 - Platform
    gnu-config/cci.20210814#dc430d754f465e8c74463019672fb97b - Cache
    libtool/2.4.7#08316dad5c72c541ed21e039e4cf217b - Cache
    m4/1.4.19#b38ced39a01e31fef5435bc634461fd2 - Cache
    meson/1.2.2#04bdfb85d665c82b08a3510aee3ffd19 - Cache
    ninja/1.11.1#77587f8c8318662ac8e5a7867eb4be21 - Cache
    pkgconf/2.1.0#27f44583701117b571307cf5b5fe5605 - Cache
    sqlite3/3.44.2#1f24f42c6c9b9122f7ee794c2a2a2078 - Cache
Resolved version ranges
    libcurl/[>=7.78.0 <9]: libcurl/8.6.0
    zlib/[>=1.2.11 <2]: zlib/1.3.1

======== Computing necessary packages ========
Requirements
    jbig/20160605#2d29fa02aacd76902e0d2cbbc24631ef:7aa3306c64e5b5d75c91240c370520803ad5b6f0#ebbb0cc7c78ff457d4609cb1c0c1ab42 - Cache
    libcurl/8.6.0#752cd9c3df0e9487b72301862f15a965:267b943cf33985f9448f72c97e42fcdb5094fcf5#527ffead2b3632a5c3e2604ebdbd6236 - Cache
    libdeflate/1.19#3ea74a4549efc14d4b1202dc4bfbf602:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#d1e46cfd32bc21ea79c573a8fd2848ea - Cache
    libgeotiff/1.7.3#b93db49c48934c76b3bd227eb1463e43:e81bf7c290d1f8f7620e541284b0e42ece3907c0 - Build
    libjpeg/9e#a794b5e74808992b08a21b126e19eab4:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#12307f46f94b310bd6a092f9eb352ad1 - Cache
    libtiff/4.6.0#51d0e7e15d032aeec1b64e65c44ecd9f:a0b8fce033edd3f94ff7ba078dd4a463977548f4#baa1e951f2b2c095c7786bb8d93a67e7 - Cache
    libwebp/1.3.2#52f69c4a31c5cf033fdd9230d77a8e38:4a23900e07eb8f1d3305b7aa3139a424b81b87ba#5abc19bf6b5981c67618ba936c07d63c - Cache
    proj/9.3.1#da0fce97195990d35c992a45aeabe766:4ff2b2b7108b8179a2a872b4e86d452b6a8c4987#5df12f4f9249f9c78f74cd6507fc84ac - Cache
    sqlite3/3.44.2#1f24f42c6c9b9122f7ee794c2a2a2078:dc4b586c4203330fce9008cb16c26d25219e4944#8d0fb50227887d426f072e4ad4669b42 - Cache
    xz_utils/5.4.5#51e5a6e6564f4ea3afd79def01f035ad:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#def0ef475451c27c7bfbe2c0df078bcb - Cache
    zlib/1.3.1#f52e03ae3d251dec704634230cd806a2:2ee39e692ca4177b4b689b15bc1f2cfdf8f83706#b041bbe929dc757f22ff689543eba5f6 - Cache
    zstd/1.5.5#1f239731dc45147c7fc2f54bfbde73df:76dad4e6c83dde347fd81bafee7e53584d62846e#b3af0a4341f246de33dc10367b78b912 - Cache
Build requirements
Skipped binaries
    nlohmann_json/3.11.3, autoconf/2.71, automake/1.16.5, cmake/3.29.1, gnu-config/cci.20210814, libtool/2.4.7, m4/1.4.19, meson/1.2.2, ninja/1.11.1, pkgconf/2.1.0, sqlite3/3.44.2

======== Installing packages ========
jbig/20160605: Already installed! (1 of 12)
libdeflate/1.19: Already installed! (2 of 12)
libjpeg/9e: Already installed! (3 of 12)
libwebp/1.3.2: Already installed! (4 of 12)
sqlite3/3.44.2: Already installed! (5 of 12)
xz_utils/5.4.5: Already installed! (6 of 12)
zlib/1.3.1: Already installed! (7 of 12)
zstd/1.5.5: Already installed! (8 of 12)
libtiff/4.6.0: Already installed! (9 of 12)
libcurl/8.6.0: Already installed! (10 of 12)
proj/9.3.1: Already installed! (11 of 12)

-------- Installing package libgeotiff/1.7.3 (12 of 12) --------
libgeotiff/1.7.3: Building from source
libgeotiff/1.7.3: Package libgeotiff/1.7.3:e81bf7c290d1f8f7620e541284b0e42ece3907c0
libgeotiff/1.7.3: Copying sources to build folder
libgeotiff/1.7.3: Building your package in /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b
libgeotiff/1.7.3: Calling generate()
libgeotiff/1.7.3: Generators folder: /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/build/Release/generators
libgeotiff/1.7.3: CMakeToolchain generated: conan_toolchain.cmake
libgeotiff/1.7.3: CMakeToolchain generated: /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/build/Release/generators/CMakePresets.json
libgeotiff/1.7.3: CMakeToolchain generated: /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/CMakeUserPresets.json
libgeotiff/1.7.3: CMakeDeps necessary find_package() and targets for your CMakeLists.txt
    find_package(PROJ)
    target_link_libraries(... PROJ::proj)
libgeotiff/1.7.3: Generating aggregated env files
libgeotiff/1.7.3: Generated aggregated env files: ['conanbuild.sh', 'conanrun.sh']
libgeotiff/1.7.3: Calling build()
libgeotiff/1.7.3: Apply patch (portability): disable fPIC, disable checking functions, disable libxtiff
libgeotiff/1.7.3: Running CMake.configure()
libgeotiff/1.7.3: RUN: cmake -G "Unix Makefiles" -DCMAKE_TOOLCHAIN_FILE="generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/p" -DWITH_UTILITIES="OFF" -DWITH_TIFF="OFF" -DWITH_ZLIB="OFF" -DWITH_JPEG="OFF" -DWITH_TOWGS84="ON" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Release" "/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src"
CMake Deprecation Warning at CMakeLists.txt:8 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Using Conan toolchain: /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: Setting CMAKE_POSITION_INDEPENDENT_CODE=ON (options.fPIC)
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is AppleClang 15.0.0.15000309
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Generating geo_config.h header
-- Generating geo_config.h header - done
-- Configuring done (0.8s)
-- Generating done (0.0s)
-- Build files have been written to: /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/build/Release

libgeotiff/1.7.3: Running CMake.build()
libgeotiff/1.7.3: RUN: cmake --build "/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/build/Release" -- -j12
[  6%] Building C object CMakeFiles/geotiff_library.dir/cpl_serv.c.o
[ 12%] Building C object CMakeFiles/geotiff_library.dir/geo_free.c.o
[ 18%] Building C object CMakeFiles/geotiff_library.dir/geo_extra.c.o
[ 25%] Building C object CMakeFiles/geotiff_library.dir/geo_simpletags.c.o
[ 31%] Building C object CMakeFiles/geotiff_library.dir/geo_normalize.c.o
[ 37%] Building C object CMakeFiles/geotiff_library.dir/geo_print.c.o
[ 43%] Building C object CMakeFiles/geotiff_library.dir/geo_tiffp.c.o
[ 50%] Building C object CMakeFiles/geotiff_library.dir/geo_trans.c.o
[ 56%] Building C object CMakeFiles/geotiff_library.dir/geo_names.c.o
[ 62%] Building C object CMakeFiles/geotiff_library.dir/geo_set.c.o
[ 68%] Building C object CMakeFiles/geotiff_library.dir/geo_get.c.o
[ 75%] Building C object CMakeFiles/geotiff_library.dir/geo_new.c.o
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_trans.c:35:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_free.c:15:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_trans.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
1 error generated.
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_print.c:18:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
make[2]: #include "tiffio.h"
         ^~~~~~~~~~
*** [CMakeFiles/geotiff_library.dir/geo_free.c.o] Error 1
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_simpletags.c:31:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_print.c.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_simpletags.c.o] Error 1
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.c:21:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_normalize.c:37:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
[ 81%] Building C object CMakeFiles/geotiff_library.dir/geo_write.c.o
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_normalize.c.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_tiffp.c.o] Error 1
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/cpl_serv.c:28:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
1 error generated.
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_new.c:19:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
make[2]: *** [CMakeFiles/geotiff_library.dir/cpl_serv.c.o] Error 1
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_get.c:17:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_names.c:18:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_new.c.o] Error 1
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_set.c:19:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
1 error generated.
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_get.c.o] Error 1
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_names.c.o] Error 1
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_write.c:15:
In file included from /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/geo_tiffp.h:33:
/Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/src/libxtiff/xtiffio.h:10:10: fatal error: 'tiffio.h' file not found
#include "tiffio.h"
         ^~~~~~~~~~
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_set.c.o] Error 1
1 error generated.
make[2]: *** [CMakeFiles/geotiff_library.dir/geo_write.c.o] Error 1
make[1]: *** [CMakeFiles/geotiff_library.dir/all] Error 2
make: *** [all] Error 2

libgeotiff/1.7.3: ERROR: 
Package 'e81bf7c290d1f8f7620e541284b0e42ece3907c0' build failed
libgeotiff/1.7.3: WARN: Build folder /Users/ruben/.conan2/p/b/libgeec8d077c23fb3/b/build/Release
ERROR: libgeotiff/1.7.3: Error in build() method, line 82
	cmake.build()
	ConanException: Error 2 while executing

Thanks!

@toge
Copy link
Contributor Author

toge commented May 30, 2024

@RubenRBS
Thank you for your attempt!
I have tried with_tiff=False on a system with libtiff installed.
After checking CMakeLists.txt, it seems that there is an internal implementation that assumes libtiff even though the with_tiff option is provided.
I will remove the with_tiff option for now and check with upstream to see what has happened in the past.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 3 (f54c287543bde7cef2994f65774c07f50e4f9cc9):

  • libgeotiff/1.7.3:
    All packages built successfully! (All logs)

  • libgeotiff/1.7.1:
    All packages built successfully! (All logs)

  • libgeotiff/1.5.1:
    All packages built successfully! (All logs)

  • libgeotiff/1.7.0:
    All packages built successfully! (All logs)

  • libgeotiff/1.6.0:
    All packages built successfully! (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 3 (f54c287543bde7cef2994f65774c07f50e4f9cc9):

  • libgeotiff/1.7.3:
    All packages built successfully! (All logs)

  • libgeotiff/1.7.0:
    All packages built successfully! (All logs)

  • libgeotiff/1.6.0:
    All packages built successfully! (All logs)

  • libgeotiff/1.5.1:
    All packages built successfully! (All logs)

  • libgeotiff/1.7.1:
    All packages built successfully! (All logs)

Copy link
Contributor

Hooks produced the following warnings for commit f54c287
libgeotiff/1.7.0@#eb202b3568fea2e229eded4580db840c
post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libgeotiff.5.1.0.dylib, libgeotiff.dylib, libgeotiff.5.dylib
libgeotiff/1.6.0@#2fc45104dba02bf493eb2151c9a3b9da
post_package(): WARN: [APPLE RELOCATABLE SHARED LIBS (KB-H077)] install_name dir of these shared libs is not @rpath: libgeotiff.dylib, libgeotiff.5.0.1.dylib, libgeotiff.5.dylib

@SpaceIm
Copy link
Contributor

SpaceIm commented May 30, 2024

Please don't change these patches, patch the new version the same way as previous patches, and don't add these options. I don't have the time to explain, but I can if you want (basically it's bad old style CMakeLists in which they try to control options of libtiff, which doesn't make sense for conan obviously), but please be sure to first understand each block you have removed.

Comment on lines -23 to -36
-if (CMAKE_MAJOR_VERSION GREATER 2)
+if(0) # No ! we want CMP0042 NEW for relocatable shared lib on macOS
cmake_policy(SET CMP0022 OLD) # interface link libraries
cmake_policy(SET CMP0042 OLD) # osx rpath
endif()
@@ -80,8 +80,9 @@ SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)

IF(WIN32)
IF(MSVC)
- ADD_DEFINITIONS(-DBUILD_AS_DLL=1)
- ADD_DEFINITIONS(/DW4)
+ IF(BUILD_SHARED_LIBS)
+ ADD_DEFINITIONS(-DBUILD_AS_DLL=1)
+ ENDIF()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't remove this, there is even a comment explaining why :/

Comment on lines -86 to -99
-TARGET_LINK_LIBRARIES(${GEOTIFF_LIBRARY_TARGET}
- ${TIFF_LIBRARIES}
- ${PROJ_LIBRARIES}
- ${ZLIB_LIBRARIES}
- ${JPEG_LIBRARIES})
+find_package(TIFF REQUIRED)
+target_link_libraries(${GEOTIFF_LIBRARY_TARGET} TIFF::TIFF)
+find_package(proj4 QUIET CONFIG)
+if(TARGET PROJ4::proj)
+ target_link_libraries(${GEOTIFF_LIBRARY_TARGET} PROJ4::proj)
+else()
+ find_package(proj REQUIRED CONFIG)
+ target_link_libraries(${GEOTIFF_LIBRARY_TARGET} PROJ::proj)
+endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't want to remove this. zlib & libjpeg are not direct dependencies of libgeotiff, it's old CMake style.

@@ -71,6 +85,7 @@ def package(self):
rmdir(self, os.path.join(self.package_folder, "cmake"))
rmdir(self, os.path.join(self.package_folder, "doc"))
rmdir(self, os.path.join(self.package_folder, "share"))
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a pkgconfig file in this new version, you should add pkg_config_name property in package_info()

@perseoGI
Copy link
Contributor

Hi @toge we are reviewing old PRs such as this one, could you take a look into this when you have some spare time?
Thank you 🚀

@perseoGI perseoGI self-requested a review July 29, 2024 11:20
Copy link
Contributor

@valgur valgur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @SpaceIm's comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants