• 大小: 12.31MB
    文件类型: .gz
    金币: 2
    下载: 1 次
    发布日期: 2023-08-05
  • 语言: 其他
  • 标签: leptonica  tesseract  

资源简介

leptonica-1.78.0官方最新版,直接下载编译之后即可使用。

资源截图

代码片段和文件信息

void build(Solution &s)
{
    auto &leptonica = s.addTarget(“danbloomberg.leptonica“ “1.78.0“);
    leptonica += Git(“https://github.com/DanBloomberg/leptonica“ “{v}“);

    {
        leptonica.setChecks(“leptonica“);

        leptonica +=
            “src/.*\\.c“_rr
            “src/.*\\.h“_rr
            “src/endianness.h.in“;

        leptonica.Public +=
            “src“_id;

        leptonica.Private += “HAVE_LIBGIF“_d;
        leptonica.Private += “HAVE_LIBJP2K“_d;
        leptonica.Private += “HAVE_LIBJPEG“_d;
        leptonica.Private += “HAVE_LIBPNG“_d;
        leptonica.Private += “HAVE_LIBTIFF“_d;
        leptonica.Private += “HAVE_LIBWEBP“_d;
        leptonica.Private += “HAVE_LIBZ“_d;
        leptonica.Private += “LIBJP2K_HEADER=\“openjpeg.h\““_d;
        leptonica.Public += “HAVE_CONFIG_H“_d;
        leptonica.Private += sw::Shared “LIBLEPT_EXPORTS“_d;
        leptonica.Interface += sw::Shared “LIBLEPT_IMPORTS“_d;

        leptonica += “org.sw.demo.gif-5“_dep;
        leptonica += “org.sw.demo.jpeg-9“_dep;
        leptonica += “org.sw.demo.uclouvain.openjpeg.openjp2-2“_dep;
        leptonica += “org.sw.demo.glennrp.png-1“_dep;
        leptonica += “org.sw.demo.tiff-4“_dep;
        leptonica += “org.sw.demo.webmproject.webp-*“_dep;

        if (leptonica.Variables[“WORDS_BIGENDIAN“] == 1)
            leptonica.Variables[“ENDIANNESS“] = “L_BIG_ENDIAN“;
        else
            leptonica.Variables[“ENDIANNESS“] = “L_LITTLE_ENDIAN“;

        leptonica.Variables[“APPLE_UNIVERSAL_BUILD“] = “defined (__APPLE_CC__)“;

        leptonica.configureFile(“src/endianness.h.in“ “endianness.h“);
        leptonica.writeFileOnce(“config_auto.h“);

        if (s.Settings.Native.CompilerType == CompilerType::MSVC)
        {
            for (auto *f : leptonica.gatherSourceFiles())
                f->BuildAs = NativeSourceFile::CPP;
        }

        if (s.Settings.TargetOS.Type == OSType::Windows)
            leptonica += “User32.lib“_l “Gdi32.lib“_l;
    }

    auto &progs = leptonica.addDirectory(“progs“);
    if (s.DryRun)
        progs.Scope = TargetScope::Test;

    {
        auto add_prog = [&s &progs &leptonica](const String &name const Files &files) -> decltype(auto)
        {
            auto &t = progs.addExecutable(name);
            t.setRootDirectory(“prog“);
            t += files;
            t += leptonica;
            if (s.Settings.Native.CompilerType == CompilerType::MSVC)
            {
                for (auto *f : t.gatherSourceFiles())
                    f->BuildAs = NativeSourceFile::CPP;
            }
            return t;
        };

        StringMap m_progs{
            {“adaptmap_reg“ {“adaptmap_reg.c“}}
            {“adaptnorm_reg“ {“adaptnorm_reg.c“}}
            {“affine_reg“ {“affine_reg.c“}}
            {“alltests_reg“ {“alltests_reg.c“}}
            {“alphaops_reg“ {“alphaops_reg.c“}}
            {“alphaxform_reg“ {“alphaxform_reg.c“}}
            {“baseline_reg“ {“basel

评论

共有 条评论