Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VTK
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Boeckel
VTK
Commits
c42060cc
Commit
c42060cc
authored
6 years ago
by
Ben Boeckel
Browse files
Options
Downloads
Patches
Plain Diff
FindTIFF: backport from CMake 3.7
parent
4773f724
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMake/patches/3.7/FindTIFF.cmake
+106
-0
106 additions, 0 deletions
CMake/patches/3.7/FindTIFF.cmake
with
106 additions
and
0 deletions
CMake/patches/3.7/FindTIFF.cmake
0 → 100644
+
106
−
0
View file @
c42060cc
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindTIFF
--------
Find the TIFF library (libtiff).
Imported targets
^^^^^^^^^^^^^^^^
This module defines the following :prop_tgt:`IMPORTED` targets:
``TIFF::TIFF``
The TIFF library, if found.
Result variables
^^^^^^^^^^^^^^^^
This module will set the following variables in your project:
``TIFF_FOUND``
true if the TIFF headers and libraries were found
``TIFF_INCLUDE_DIR``
the directory containing the TIFF headers
``TIFF_INCLUDE_DIRS``
the directory containing the TIFF headers
``TIFF_LIBRARIES``
TIFF libraries to be linked
Cache variables
^^^^^^^^^^^^^^^
The following cache variables may also be set:
``TIFF_INCLUDE_DIR``
the directory containing the TIFF headers
``TIFF_LIBRARY``
the path to the TIFF library
#]=======================================================================]
find_path
(
TIFF_INCLUDE_DIR tiff.h
)
set
(
TIFF_NAMES
${
TIFF_NAMES
}
tiff libtiff tiff3 libtiff3
)
foreach
(
name
${
TIFF_NAMES
}
)
list
(
APPEND TIFF_NAMES_DEBUG
"
${
name
}
d"
)
endforeach
()
if
(
NOT TIFF_LIBRARY
)
find_library
(
TIFF_LIBRARY_RELEASE NAMES
${
TIFF_NAMES
}
)
find_library
(
TIFF_LIBRARY_DEBUG NAMES
${
TIFF_NAMES_DEBUG
}
)
include
(
SelectLibraryConfigurations
)
select_library_configurations
(
TIFF
)
mark_as_advanced
(
TIFF_LIBRARY_RELEASE TIFF_LIBRARY_DEBUG
)
endif
()
unset
(
TIFF_NAMES
)
unset
(
TIFF_NAMES_DEBUG
)
if
(
TIFF_INCLUDE_DIR AND EXISTS
"
${
TIFF_INCLUDE_DIR
}
/tiffvers.h"
)
file
(
STRINGS
"
${
TIFF_INCLUDE_DIR
}
/tiffvers.h"
tiff_version_str
REGEX
"^#define[
\t
]+TIFFLIB_VERSION_STR[
\t
]+
\"
LIBTIFF, Version .*"
)
string
(
REGEX REPLACE
"^#define[
\t
]+TIFFLIB_VERSION_STR[
\t
]+
\"
LIBTIFF, Version +([^
\\
n]*).*"
"
\\
1"
TIFF_VERSION_STRING
"
${
tiff_version_str
}
"
)
unset
(
tiff_version_str
)
endif
()
include
(
FindPackageHandleStandardArgs
)
FIND_PACKAGE_HANDLE_STANDARD_ARGS
(
TIFF
REQUIRED_VARS TIFF_LIBRARY TIFF_INCLUDE_DIR
VERSION_VAR TIFF_VERSION_STRING
)
if
(
TIFF_FOUND
)
set
(
TIFF_LIBRARIES
${
TIFF_LIBRARY
}
)
set
(
TIFF_INCLUDE_DIRS
"
${
TIFF_INCLUDE_DIR
}
"
)
if
(
NOT TARGET TIFF::TIFF
)
add_library
(
TIFF::TIFF UNKNOWN IMPORTED
)
if
(
TIFF_INCLUDE_DIRS
)
set_target_properties
(
TIFF::TIFF PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES
"
${
TIFF_INCLUDE_DIRS
}
"
)
endif
()
if
(
EXISTS
"
${
TIFF_LIBRARY
}
"
)
set_target_properties
(
TIFF::TIFF PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES
"C"
IMPORTED_LOCATION
"
${
TIFF_LIBRARY
}
"
)
endif
()
if
(
EXISTS
"
${
TIFF_LIBRARY_RELEASE
}
"
)
set_property
(
TARGET TIFF::TIFF APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE
)
set_target_properties
(
TIFF::TIFF PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE
"C"
IMPORTED_LOCATION_RELEASE
"
${
TIFF_LIBRARY_RELEASE
}
"
)
endif
()
if
(
EXISTS
"
${
TIFF_LIBRARY_DEBUG
}
"
)
set_property
(
TARGET TIFF::TIFF APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG
)
set_target_properties
(
TIFF::TIFF PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES_DEBUG
"C"
IMPORTED_LOCATION_DEBUG
"
${
TIFF_LIBRARY_DEBUG
}
"
)
endif
()
endif
()
endif
()
mark_as_advanced
(
TIFF_INCLUDE_DIR TIFF_LIBRARY
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment