Move training lib sources into their own dirs.

This commit is contained in:
Egor Pugin 2020-12-31 18:27:03 +03:00
parent 1a53ca099a
commit 07a1533a01
58 changed files with 10 additions and 67 deletions

View File

@ -45,6 +45,8 @@
#include "pango/pangocairo.h"
#include "pango/pangofc-font.h"
#define DISABLE_HEAP_LEAK_CHECK
using namespace tesseract;
namespace tesseract {

View File

@ -39,6 +39,8 @@
#include "unicode/uchar.h" // from libicu
#include "util.h"
#define DISABLE_HEAP_LEAK_CHECK
namespace tesseract {
static const int kDefaultOutputResolution = 300;

View File

@ -1,24 +0,0 @@
/**********************************************************************
* File: util.h
* Description: Misc STL string utility functions.
* Author: Samuel Charron
*
* (C) Copyright 2013, Google Inc.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
**********************************************************************/
#ifndef TESSERACT_TRAINING_UTIL_H_
#define TESSERACT_TRAINING_UTIL_H_
#define DISABLE_HEAP_LEAK_CHECK {}
#endif // TESSERACT_TRAINING_UTIL_H_

49
sw.cpp
View File

@ -126,27 +126,8 @@ void build(Solution &s)
{
common_training += "TESS_COMMON_TRAINING_API"_api;
common_training += cppstd;
common_training +=
"src/training/commandlineflags.cpp",
"src/training/commandlineflags.h",
"src/training/commontraining.cpp",
"src/training/commontraining.h",
"src/training/ctc.cpp",
"src/training/ctc.h",
"src/training/errorcounter.cpp",
"src/training/errorcounter.h",
"src/training/intfeaturedist.cpp",
"src/training/intfeaturedist.h",
"src/training/intfeaturemap.cpp",
"src/training/intfeaturemap.h",
"src/training/mastertrainer.cpp",
"src/training/mastertrainer.h",
"src/training/networkbuilder.cpp",
"src/training/networkbuilder.h",
"src/training/sampleiterator.cpp",
"src/training/sampleiterator.h",
"src/training/trainingsampleset.cpp",
"src/training/trainingsampleset.h";
common_training += "src/training/common/.*"_rr;
common_training.Public += "src/training/common"_idir;
common_training.Public += tessopt;
}
@ -155,16 +136,8 @@ void build(Solution &s)
{
unicharset_training += "TESS_UNICHARSET_TRAINING_API"_api;
unicharset_training += cppstd;
unicharset_training +=
"src/training/fileio.*"_rr,
"src/training/icuerrorcode.*"_rr,
"src/training/icuerrorcode.h",
"src/training/lang_model_helpers.*"_rr,
"src/training/lstmtester.*"_rr,
"src/training/lstmtrainer.*"_rr,
"src/training/normstrngs.*"_rr,
"src/training/unicharset_training_utils.*"_rr,
"src/training/validat.*"_rr;
unicharset_training += "src/training/unicharset/.*"_rr;
unicharset_training.Public += "src/training/unicharset"_idir;
unicharset_training.Public += common_training;
unicharset_training.Public += "org.sw.demo.unicode.icu.i18n"_dep;
}
@ -197,18 +170,8 @@ void build(Solution &s)
{
pango_training += "TESS_PANGO_TRAINING_API"_api;
pango_training += cppstd;
pango_training +=
"src/training/boxchar.cpp",
"src/training/boxchar.h",
"src/training/ligature_table.cpp",
"src/training/ligature_table.h",
"src/training/pango_font_info.cpp",
"src/training/pango_font_info.h",
"src/training/stringrenderer.cpp",
"src/training/stringrenderer.h",
"src/training/tlog.cpp",
"src/training/tlog.h"
;
pango_training += "src/training/pango/.*"_rr;
pango_training.Public += "src/training/pango"_idir;
pango_training.Public += unicharset_training;
pango_training.Public += "org.sw.demo.gnome.pango.pangocairo"_dep;
}