cmake: do not try to configure training tools without PkgConfig

This commit is contained in:
zdenop 2021-12-18 09:29:20 +01:00
parent 2ee90ffe08
commit b565cfee9b

View File

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