vcpkg/ports/ptex/fix-config.cmake.patch
NancyLi1013 f13fb1c96b [ptext] Fix library cannot be found by find_package() (#9455)
* [ptext] Fix library cannot be found by find_package()

* Update copyright
2020-01-02 13:42:04 -08:00

19 lines
675 B
Diff

diff --git a/src/build/ptex-config.cmake b/src/build/ptex-config.cmake
index f95df9e..2d3f58f 100644
--- a/src/build/ptex-config.cmake
+++ b/src/build/ptex-config.cmake
@@ -1,11 +1,11 @@
@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
include("${CMAKE_CURRENT_LIST_DIR}/ptex-version.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/ptex-exports.cmake")
# Provide PkgConfig::ZLIB to downstream dependents
-find_package(PkgConfig REQUIRED)
-pkg_checK_modules(Ptex_ZLIB REQUIRED zlib IMPORTED_TARGET)
+find_dependency(ZLIB REQUIRED)
set_and_check(Ptex_DIR @PACKAGE_CMAKE_INSTALL_PREFIX@)
set_and_check(Ptex_LIBRARY_DIRS @PACKAGE_CMAKE_INSTALL_LIBDIR@)