cmake: do not try to even configure training tools if pkg-config is not present.

This commit is contained in:
Zdenko Podobný 2021-12-20 13:37:37 +01:00
parent 8f02255294
commit bcf7bbb6e2

View File

@ -346,6 +346,10 @@ if(SW_BUILD)
sw_execute()
else()
find_package(PkgConfig)
if(BUILD_TRAINING_TOOLS and NOT PKG_CONFIG_FOUND)
message(WARNING "Building of Training Tools requires PkgConfig")
set(BUILD_TRAINING_TOOLS OFF)
endif(BUILD_TRAINING_TOOLS)
# Check for required library. option -DLeptonica_DIR=path => cmake hint where
# to find leptonica
find_package(Leptonica ${MINIMUM_LEPTONICA_VERSION} CONFIG)