summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-08-17 14:24:53 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-08-17 14:24:53 (GMT)
commit8ca1c2b2b351ee7c600a041cc31d36cfe9d16d30 (patch)
treec30a1f53d351b510142890187939c1a6bc622038 /Modules
parent89b483f2b6f136509168ea4764072bae119ef618 (diff)
parent724fa682705a17bef0c74b9dcf09bc9cf1761dde (diff)
downloadCMake-8ca1c2b2b351ee7c600a041cc31d36cfe9d16d30.zip
CMake-8ca1c2b2b351ee7c600a041cc31d36cfe9d16d30.tar.gz
CMake-8ca1c2b2b351ee7c600a041cc31d36cfe9d16d30.tar.bz2
Merge topic 'FindTIFF-updates'
724fa682 FindTIFF: Find debug and release libraries separately
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindTIFF.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/Modules/FindTIFF.cmake b/Modules/FindTIFF.cmake
index a67d24d..ed092ea 100644
--- a/Modules/FindTIFF.cmake
+++ b/Modules/FindTIFF.cmake
@@ -34,7 +34,19 @@
find_path(TIFF_INCLUDE_DIR tiff.h)
set(TIFF_NAMES ${TIFF_NAMES} tiff libtiff tiff3 libtiff3)
-find_library(TIFF_LIBRARY NAMES ${TIFF_NAMES} )
+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(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake)
+ 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