Skip to content

Commit 087576f

Browse files
committed
cmake: fix linux build
1 parent 546a9e8 commit 087576f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,11 @@ endif()
143143
###############################################################################
144144

145145
if(NOT CPPAN_BUILD)
146+
find_package(PkgConfig)
146147
if (NOT Leptonica_DIR AND NOT MSVC AND COMMAND pkg_check_modules)
147-
find_package(PkgConfig REQUIRED)
148+
if(NOT PKG_CONFIG_EXECUTABLE)
149+
message(FATAL_ERROR "Missing required pkg-config")
150+
endif()
148151
pkg_check_modules(Leptonica REQUIRED lept>=${MINIMUM_LEPTONICA_VERSION})
149152
link_directories(${Leptonica_LIBRARY_DIRS})
150153
else()

0 commit comments

Comments
 (0)