Closed jschueller closed 12 months ago
it seems to be including the build time path on windows. how does that typically get addressed there?
set_target_properties(TIFF::tiff PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
)
^^^ Is the above line from qt or from libtiff? if it is from qt, it seems to be wrong and likely assuming vendoring of some kind
I'm not an expert with cmake, but is _IMPORT_PREFIX
equivalent to ${PREFIX}, or ${PREFIX}/lib/cmake/tiff
?
this script is automatically generated by cmake export command
_IMPORT_PREFIX should have a value of ${PREFIX}
at the end of the cmake script (%LIBRARY_PREFIX% on windows
)
the first part of the path C:/bld/qt6-main_1696944674905/_h_env/Library/
should be ok because that's where libtiff should be installed (the host env for qt6 build), the script starts from the location of itself (Library\lib\cmake\tiff\libtifftargets.cmake), then goes up 3 parents (Library), and adds /include (Library/include)
The diff from the two packages
diff -u libtiff-4.5.1-h6c8260b_1/pkg-libtiff-4.5.1-h6c8260b_1/Library/lib/cmake/tiff/TiffConfig.cmake libtiff-4.6.0-h6e2ebb7_2/pkg-libtiff-4.6.0-h6e2ebb7_2/Library/lib/cmake/tiff/TiffConfig.cmake
--- libtiff-4.5.1-h6c8260b_1/pkg-libtiff-4.5.1-h6c8260b_1/Library/lib/cmake/tiff/TiffConfig.cmake 2023-08-24 13:15:43.000000000 -0400
+++ libtiff-4.6.0-h6e2ebb7_2/pkg-libtiff-4.6.0-h6e2ebb7_2/Library/lib/cmake/tiff/TiffConfig.cmake 2023-09-25 13:10:12.000000000 -0400
@@ -1,6 +1,28 @@
if(NOT "ON")
# TODO: import dependencies
endif()
+
+function(set_variable_from_rel_or_absolute_path var root rel_or_abs_path)
+ if(IS_ABSOLUTE "${rel_or_abs_path}")
+ set(${var} "${rel_or_abs_path}" PARENT_SCOPE)
+ else()
+ set(${var} "${root}/${rel_or_abs_path}" PARENT_SCOPE)
+ endif()
+endfunction()
+
+# Tell the user project where to find our headers and libraries
+get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" ABSOLUTE)
+get_filename_component(_DIR "${_DIR}" DIRECTORY)
+get_filename_component(_ROOT "${_DIR}/" ABSOLUTE)
+# Use _ROOT as prefix here for the possibility of relocation after installation.
+set_variable_from_rel_or_absolute_path("TIFF_INCLUDE_DIR" "${_ROOT}" "include")
+set(TIFF_INCLUDE_DIRS ${TIFF_INCLUDE_DIR})
+
+set(TIFF_LIBRARIES TIFF::tiff)
+
if(NOT TARGET TIFF::tiff)
- include("${CMAKE_CURRENT_LIST_DIR}/TiffTargets.cmake")
+ include("${_DIR}/TiffTargets.cmake")
endif()
+
+unset (_ROOT)
+unset (_DIR)
diff -u libtiff-4.5.1-h6c8260b_1/pkg-libtiff-4.5.1-h6c8260b_1/Library/lib/cmake/tiff/TiffConfigVersion.cmake libtiff-4.6.0-h6e2ebb7_2/pkg-libtiff-4.6.0-h6e2ebb7_2/Library/lib/cmake/tiff/TiffConfigVersion.cmake
--- libtiff-4.5.1-h6c8260b_1/pkg-libtiff-4.5.1-h6c8260b_1/Library/lib/cmake/tiff/TiffConfigVersion.cmake 2023-08-24 13:15:43.000000000 -0400
+++ libtiff-4.6.0-h6e2ebb7_2/pkg-libtiff-4.6.0-h6e2ebb7_2/Library/lib/cmake/tiff/TiffConfigVersion.cmake 2023-09-25 13:10:12.000000000 -0400
@@ -9,19 +9,19 @@
# The variable CVF_VERSION must be set before calling configure_file().
-set(PACKAGE_VERSION "4.5.1")
+set(PACKAGE_VERSION "4.6.0")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
- if("4.5.1" MATCHES "^([0-9]+)\\.")
+ if("4.6.0" MATCHES "^([0-9]+)\\.")
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
endif()
else()
- set(CVF_VERSION_MAJOR "4.5.1")
+ set(CVF_VERSION_MAJOR "4.6.0")
endif()
if(PACKAGE_FIND_VERSION_RANGE)
diff -u libtiff-4.5.1-h6c8260b_1/pkg-libtiff-4.5.1-h6c8260b_1/Library/lib/cmake/tiff/TiffTargets.cmake libtiff-4.6.0-h6e2ebb7_2/pkg-libtiff-4.6.0-h6e2ebb7_2/Library/lib/cmake/tiff/TiffTargets.cmake
--- libtiff-4.5.1-h6c8260b_1/pkg-libtiff-4.5.1-h6c8260b_1/Library/lib/cmake/tiff/TiffTargets.cmake 2023-08-24 13:15:57.000000000 -0400
+++ libtiff-4.6.0-h6e2ebb7_2/pkg-libtiff-4.6.0-h6e2ebb7_2/Library/lib/cmake/tiff/TiffTargets.cmake 2023-09-25 13:10:17.000000000 -0400
@@ -7,7 +7,7 @@
message(FATAL_ERROR "CMake >= 2.8.3 required")
endif()
cmake_policy(PUSH)
-cmake_policy(VERSION 2.8.3...3.24)
+cmake_policy(VERSION 2.8.3...3.25)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
Chat GPT suggests:
looks that TiffConfig.cmake is bogus
xid you want to make a PR here to fix it in the feedstocks?
I'm very ok fixing build related stuff when an upstream issue or merge request is created
lets see what libtiff says first, I already have a simple workaround in the qt feedstock
Solution to issue cannot be found in the documentation.
Issue
when building qt6 on windows with 4.6.0 I get this error:
I looked at the Library/lib/cmake/tiff/TiffTargets.cmake but it looks correct:
any idea ?
Installed packages
Environment info