From 07194ab235d4dbfd23fa35dbb6435efde9f6c4cb Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Sun, 7 May 2017 20:13:04 +0300 Subject: [PATCH] Update CMakeLists.txt --- training/CMakeLists.txt | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/training/CMakeLists.txt b/training/CMakeLists.txt index c13ed774..f0fd6ab5 100644 --- a/training/CMakeLists.txt +++ b/training/CMakeLists.txt @@ -199,13 +199,15 @@ project_group (set_unicharset_properties "Training Tools") # EXECUTABLE text2image ######################################## -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 @@ -233,19 +235,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 common_training - ${ICU_LIBRARIES} +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) ###############################################################################