OSGeo / libgeotiff

Official repository of the libgeotiff project
180 stars 69 forks source link

CMake: avoid INTERFACE_LINK_LIBRARIES vs LINK_INTERFACE_LIBRARIES_DEBUG warning about TIFF #70

Closed rouault closed 2 years ago

rouault commented 2 years ago

when using vcpkg to find TIFF dependency and with -DCMAKE_BUILD_TYPE=Release

Cf

CMake Warning (dev) in CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "geotiff_library" has an INTERFACE_LINK_LIBRARIES property which
  differs from its LINK_INTERFACE_LIBRARIES_DEBUG properties.

  INTERFACE_LINK_LIBRARIES:

    $<$<NOT:$<CONFIG:DEBUG>>:C:/vcpkg/installed/x64-windows/lib/tiff.lib>;$<$<CONFIG:DEBUG>:C:/vcpkg/installed/x64-windows/debug/lib/tiffd.lib>

  LINK_INTERFACE_LIBRARIES_DEBUG:

    C:/vcpkg/installed/x64-windows/debug/lib/tiffd.lib

from https://github.com/OSGeo/libgeotiff/runs/5311074542?check_suite_focus=true

CC @dg0yt