mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
FindTIFF: consider IMPLIB-using platforms
Support multi-config-providing and `IMPLIB`-using deployments with the
`tiff-config` trampoline code. Follow the pattern used in `FindFreetype`
by commit ae9890cd36 (FindFreeType: consider `IMPLIB`-using platforms,
2023-10-26, v3.28.0-rc4~10^2~3).
See: #25485
This commit is contained in:
@@ -107,15 +107,86 @@ if (tiff_FOUND)
|
||||
endif ()
|
||||
get_property(TIFF_INCLUDE_DIRS TARGET TIFF::tiff PROPERTY INTERFACE_INCLUDE_DIRECTORIES)
|
||||
get_property(TIFF_LIBRARIES TARGET TIFF::tiff PROPERTY INTERFACE_LINK_LIBRARIES)
|
||||
get_property(_TIFF_location TARGET TIFF::tiff PROPERTY LOCATION)
|
||||
list(APPEND TIFF_LIBRARIES
|
||||
get_property(_TIFF_location TARGET TIFF::tiff PROPERTY IMPORTED_IMPLIB)
|
||||
if (NOT _TIFF_location)
|
||||
get_property(_TIFF_location_release TARGET TIFF::tiff PROPERTY IMPORTED_IMPLIB_RELEASE)
|
||||
if (NOT _TIFF_location_release)
|
||||
get_property(_TIFF_location_release TARGET TIFF::tiff PROPERTY IMPORTED_IMPLIB_RELWITHDEBINFO)
|
||||
endif ()
|
||||
get_property(_TIFF_location_debug TARGET TIFF::tiff PROPERTY IMPORTED_IMPLIB_DEBUG)
|
||||
if (_TIFF_location_release AND _TIFF_location_debug)
|
||||
set(_TIFF_location
|
||||
optimized "${_TIFF_location_release}"
|
||||
debug "${_TIFF_location_debug}")
|
||||
elseif (_TIFF_location_release)
|
||||
set(_TIFF_location "${_TIFF_location_release}")
|
||||
elseif (_TIFF_location_debug)
|
||||
set(_TIFF_location "${_TIFF_location_debug}")
|
||||
else ()
|
||||
get_property(_TIFF_location_release TARGET TIFF::tiff PROPERTY LOCATION_RELEASE)
|
||||
if (NOT _TIFF_location_release)
|
||||
get_property(_TIFF_location_release TARGET TIFF::tiff PROPERTY LOCATION_RELWITHDEBINFO)
|
||||
endif ()
|
||||
get_property(_TIFF_location_debug TARGET TIFF::tiff PROPERTY LOCATION_DEBUG)
|
||||
if (_TIFF_location_release AND _TIFF_location_debug)
|
||||
set(_TIFF_location
|
||||
optimized "${_TIFF_location_release}"
|
||||
debug "${_TIFF_location_debug}")
|
||||
elseif (_TIFF_location_release)
|
||||
set(_TIFF_location "${_TIFF_location_release}")
|
||||
elseif (_TIFF_location_debug)
|
||||
set(_TIFF_location "${_TIFF_location_debug}")
|
||||
else ()
|
||||
get_property(_TIFF_location TARGET TIFF::tiff PROPERTY LOCATION)
|
||||
endif ()
|
||||
endif ()
|
||||
unset(_TIFF_location_release)
|
||||
unset(_TIFF_location_debug)
|
||||
endif ()
|
||||
list(INSERT TIFF_LIBRARIES 0
|
||||
"${_TIFF_location}")
|
||||
unset(_TIFF_location)
|
||||
set(TIFF_FOUND 1)
|
||||
if("CXX" IN_LIST TIFF_FIND_COMPONENTS)
|
||||
if (TARGET TIFF::CXX)
|
||||
get_property(_TIFF_CXX_location TARGET TIFF::CXX PROPERTY LOCATION)
|
||||
list(APPEND TIFF_LIBRARIES ${_TIFF_CXX_location})
|
||||
get_property(_TIFF_CXX_location TARGET TIFF::CXX PROPERTY IMPORTED_IMPLIB)
|
||||
if (NOT _TIFF_CXX_location)
|
||||
get_property(_TIFF_CXX_location_release TARGET TIFF::CXX PROPERTY IMPORTED_IMPLIB_RELEASE)
|
||||
if (NOT _TIFF_CXX_location_release)
|
||||
get_property(_TIFF_CXX_location_release TARGET TIFF::CXX PROPERTY IMPORTED_IMPLIB_RELWITHDEBINFO)
|
||||
endif ()
|
||||
get_property(_TIFF_CXX_location_debug TARGET TIFF::CXX PROPERTY IMPORTED_IMPLIB_DEBUG)
|
||||
if (_TIFF_CXX_location_release AND _TIFF_CXX_location_debug)
|
||||
set(_TIFF_CXX_location
|
||||
optimized "${_TIFF_CXX_location_release}"
|
||||
debug "${_TIFF_CXX_location_debug}")
|
||||
elseif (_TIFF_CXX_location_release)
|
||||
set(_TIFF_CXX_location "${_TIFF_CXX_location_release}")
|
||||
elseif (_TIFF_CXX_location_debug)
|
||||
set(_TIFF_CXX_location "${_TIFF_CXX_location_debug}")
|
||||
else ()
|
||||
get_property(_TIFF_CXX_location_release TARGET TIFF::CXX PROPERTY LOCATION_RELEASE)
|
||||
if (NOT _TIFF_CXX_location_release)
|
||||
get_property(_TIFF_CXX_location_release TARGET TIFF::CXX PROPERTY LOCATION_RELWITHDEBINFO)
|
||||
endif ()
|
||||
get_property(_TIFF_CXX_location_debug TARGET TIFF::CXX PROPERTY LOCATION_DEBUG)
|
||||
if (_TIFF_CXX_location_release AND _TIFF_CXX_location_debug)
|
||||
set(_TIFF_CXX_location
|
||||
optimized "${_TIFF_CXX_location_release}"
|
||||
debug "${_TIFF_CXX_location_debug}")
|
||||
elseif (_TIFF_CXX_location_release)
|
||||
set(_TIFF_CXX_location "${_TIFF_CXX_location_release}")
|
||||
elseif (_TIFF_CXX_location_debug)
|
||||
set(_TIFF_CXX_location "${_TIFF_CXX_location_debug}")
|
||||
else ()
|
||||
get_property(_TIFF_CXX_location TARGET TIFF::CXX PROPERTY LOCATION)
|
||||
endif ()
|
||||
endif ()
|
||||
unset(_TIFF_CXX_location_release)
|
||||
unset(_TIFF_CXX_location_debug)
|
||||
endif ()
|
||||
list(INSERT TIFF_LIBRARIES 0
|
||||
"${_TIFF_CXX_location}")
|
||||
unset(_TIFF_CXX_location)
|
||||
set(TIFF_CXX_FOUND 1)
|
||||
else ()
|
||||
|
||||
Reference in New Issue
Block a user