Skip to content

Commit b375728

Browse files
committed
Add BUILD_TRAINING CMake option.
1 parent bf36e52 commit b375728

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ install:
4141
script:
4242
- mkdir build
4343
- cd build
44-
- cmake .. -DLeptonica_DIR=leptonica-master/build
44+
- cmake .. -DLeptonica_DIR=leptonica-master/build -DBUILD_TRAINING=1
4545
- make

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ set(VERSION_PLAIN ${VERSION_MAJOR}.${VERSION_MINOR})
4646

4747
find_package(Leptonica 1.72 REQUIRED)
4848

49+
if (BUILD_TRAINING)
4950
find_package(ICU COMPONENTS uc i18n)
5051
find_package(PkgConfig)
5152
pkg_check_modules(Pango pango)
@@ -57,6 +58,7 @@ pkg_check_modules(FontConfig fontconfig)
5758
include_directories(${ICU_INCLUDE_DIRS})
5859
include_directories(${Pango_INCLUDE_DIRS})
5960
include_directories(${Cairo_INCLUDE_DIRS})
61+
endif()
6062

6163
###############################################################################
6264
#
@@ -212,6 +214,8 @@ target_link_libraries (tesseractmain tesseract)
212214

213215
########################################
214216

217+
if (BUILD_TRAINING)
215218
add_subdirectory(training)
219+
endif()
216220

217221
###############################################################################

0 commit comments

Comments
 (0)