cmake: fix linux build

This commit is contained in:
Zdenko Podobný 2019-04-29 18:00:03 +02:00
parent 546a9e81eb
commit 087576f2d9

View File

@ -143,8 +143,11 @@ endif()
###############################################################################
if(NOT CPPAN_BUILD)
find_package(PkgConfig)
if (NOT Leptonica_DIR AND NOT MSVC AND COMMAND pkg_check_modules)
find_package(PkgConfig REQUIRED)
if(NOT PKG_CONFIG_EXECUTABLE)
message(FATAL_ERROR "Missing required pkg-config")
endif()
pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION})
link_directories(${Leptonica_LIBRARY_DIRS})
else()