vcpkg/ports/vtk/fix-find-lz4.patch
Alexander Neumann 4279a79208 [vtk] fix typo in lzma and lz4 patch (#8403)
* correct find_library call

there was a typo.

* fix find_library call

* Update CONTROL
2019-09-30 08:49:36 -07:00

21 lines
635 B
Diff

diff --git a/CMake/FindLZ4.cmake b/CMake/FindLZ4.cmake
index 07343e1f79..b43a9af2c7 100644
--- a/CMake/FindLZ4.cmake
+++ b/CMake/FindLZ4.cmake
@@ -1,7 +1,13 @@
-
-find_library(LZ4_LIBRARIES NAMES lz4)
+find_library(LZ4_LIBRARY NAMES lz4 PATH_SUFFIXES lib)
+find_library(LZ4_LIBRARY_DEBUG NAMES lz4d PATH_SUFFIXES debug/lib)
find_path(LZ4_INCLUDE_DIRS NAMES lz4.h)
+if(NOT LZ4_LIBRARY_DEBUG)
+ set(LZ4_LIBRARY_DEBUG ${LZ4_LIBRARY})
+endif(NOT LZ4_LIBRARY_DEBUG)
+
+set(LZ4_LIBRARIES optimized ${LZ4_LIBRARY} debug ${LZ4_LIBRARY_DEBUG})
+
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LZ4
DEFAULT_MSG