Skip to content

Commit f8498e2

Browse files
committed
CMake: Fix TIFF_INCLUDE_DIRS
1 parent cfc9269 commit f8498e2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmake/TiffConfig.cmake.in

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ function(set_variable_from_rel_or_absolute_path var root rel_or_abs_path)
1111
endfunction()
1212

1313
# Tell the user project where to find our headers and libraries
14-
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" ABSOLUTE)
15-
get_filename_component(_DIR "${_DIR}" DIRECTORY)
14+
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_DIR}/../../.." ABSOLUTE)
1615
get_filename_component(_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
1716
# Use _ROOT as prefix here for the possibility of relocation after installation.
1817
set_variable_from_rel_or_absolute_path("TIFF_INCLUDE_DIR" "${_ROOT}" "@CMAKE_INSTALL_INCLUDEDIR@")
@@ -21,7 +20,7 @@ set(TIFF_INCLUDE_DIRS ${TIFF_INCLUDE_DIR})
2120
set(TIFF_LIBRARIES TIFF::tiff)
2221

2322
if(NOT TARGET TIFF::tiff)
24-
include("${_DIR}/TiffTargets.cmake")
23+
include("${CMAKE_CURRENT_LIST_DIR}/TiffTargets.cmake")
2524
endif()
2625

2726
unset (_ROOT)

0 commit comments

Comments
 (0)