mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
Turn on building of text2image.
This commit is contained in:
parent
6ba14f3909
commit
2ea946d11c
11
cppan.yml
11
cppan.yml
@ -3,9 +3,14 @@ local_settings:
|
||||
#generator: Visual Studio 14 2015 Win64
|
||||
silent: false
|
||||
#copy_import_libs: true
|
||||
build:
|
||||
c_flags: /W0
|
||||
cxx_flags: /W0
|
||||
#build:
|
||||
#c_flags: /W0
|
||||
#cxx_flags: /W0
|
||||
builds:
|
||||
vs2017:
|
||||
generator: Visual Studio 15 2017
|
||||
vs2017_64:
|
||||
generator: Visual Studio 15 2017 Win64
|
||||
|
||||
dependencies:
|
||||
pvt.cppan.demo.danbloomberg.leptonica: 1
|
||||
|
@ -228,13 +228,15 @@ if (NOT CPPAN_BUILD)
|
||||
find_package(PkgConfig)
|
||||
endif()
|
||||
|
||||
if (PKG_CONFIG_FOUND)
|
||||
if (PKG_CONFIG_FOUND OR CPPAN_BUILD)
|
||||
|
||||
if (PKG_CONFIG_FOUND)
|
||||
pkg_check_modules(Pango REQUIRED pango)
|
||||
pkg_check_modules(Cairo REQUIRED cairo)
|
||||
pkg_check_modules(PangoFt2 REQUIRED pangoft2)
|
||||
pkg_check_modules(PangoCairo REQUIRED pangocairo)
|
||||
pkg_check_modules(FontConfig REQUIRED fontconfig)
|
||||
endif()
|
||||
|
||||
set(text2image_src
|
||||
text2image.cpp
|
||||
@ -260,18 +262,24 @@ set(text2image_src ${text2image_src} ../vs2010/port/strcasestr.cpp)
|
||||
endif()
|
||||
|
||||
add_executable (text2image ${text2image_src})
|
||||
target_link_libraries (text2image unicharset_training)
|
||||
if (PKG_CONFIG_FOUND)
|
||||
target_include_directories (text2image BEFORE PRIVATE ${Cairo_INCLUDE_DIRS} ${Pango_INCLUDE_DIRS})
|
||||
target_compile_definitions (text2image PRIVATE -DPANGO_ENABLE_ENGINE)
|
||||
target_link_libraries (text2image libtesseract unicharset_training
|
||||
target_link_libraries (text2image
|
||||
${Pango_LIBRARIES}
|
||||
${Cairo_LIBRARIES}
|
||||
${PangoCairo_LIBRARIES}
|
||||
${PangoFt2_LIBRARIES}
|
||||
${FontConfig_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
if (CPPAN_BUILD)
|
||||
target_link_libraries (text2image pvt.cppan.demo.gnome.pango.pangocairo)
|
||||
endif()
|
||||
project_group (text2image "Training Tools")
|
||||
|
||||
endif(PKG_CONFIG_FOUND)
|
||||
endif()
|
||||
endif(ICU_FOUND)
|
||||
|
||||
###############################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user