vcpkg/ports/leptonica/fix-find-libwebp.patch
JackBoosY 34a26540b1 [leptonica]Add dependency port libwebp and fix find libwebp in debug/release (#7712)
* [leptonica]Add dependency port libwebp and fix find libwebp in debug/release.

* [leptonica]Add dependency to LeptonicaConfig.cmake.

* [leptonica]Re-fix find libwebp.
2019-08-21 14:01:57 -07:00

15 lines
504 B
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index debc232..2aa2d3a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,8 +60,7 @@ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/.cppan)
endif()
if(NOT WEBP)
message(STATUS "Looking for WEBP")
- find_path(WEBP_INCLUDE_DIR /webp/decode.h)
- find_library(WEBP_LIBRARY NAMES webp)
+ find_package(WebP CONFIG REQUIRED)
if (WEBP_INCLUDE_DIR AND WEBP_LIBRARY)
set(WEBP 1)
set(WEBP_FOUND TRUE)