Skip to content

Commit

Permalink
Add BUILD_TRAINING CMake option.
Browse files Browse the repository at this point in the history
  • Loading branch information
egorpugin committed Sep 6, 2015
1 parent bf36e52 commit b375728
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -41,5 +41,5 @@ install:
script:
- mkdir build
- cd build
- cmake .. -DLeptonica_DIR=leptonica-master/build
- cmake .. -DLeptonica_DIR=leptonica-master/build -DBUILD_TRAINING=1
- make
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -46,6 +46,7 @@ set(VERSION_PLAIN ${VERSION_MAJOR}.${VERSION_MINOR})

find_package(Leptonica 1.72 REQUIRED)

if (BUILD_TRAINING)
find_package(ICU COMPONENTS uc i18n)
find_package(PkgConfig)
pkg_check_modules(Pango pango)
Expand All @@ -57,6 +58,7 @@ pkg_check_modules(FontConfig fontconfig)
include_directories(${ICU_INCLUDE_DIRS})
include_directories(${Pango_INCLUDE_DIRS})
include_directories(${Cairo_INCLUDE_DIRS})
endif()

###############################################################################
#
Expand Down Expand Up @@ -212,6 +214,8 @@ target_link_libraries (tesseractmain tesseract)

########################################

if (BUILD_TRAINING)
add_subdirectory(training)
endif()

###############################################################################

0 comments on commit b375728

Please sign in to comment.