From c01c10f2d0aac78acbc9051dd5c05b8b7d10fcb6 Mon Sep 17 00:00:00 2001 From: lzwdgc Date: Sat, 20 Feb 2021 23:16:41 +0300 Subject: [PATCH] Fix script2txt build. --- src/script2txt/script2txt.cpp | 1 + sw.cpp | 33 ++++++++++++++++++--------------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/src/script2txt/script2txt.cpp b/src/script2txt/script2txt.cpp index 8f48fa1..1ecb40c 100644 --- a/src/script2txt/script2txt.cpp +++ b/src/script2txt/script2txt.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include #include diff --git a/sw.cpp b/sw.cpp index 8dfec41..55ed135 100644 --- a/sw.cpp +++ b/sw.cpp @@ -47,23 +47,26 @@ void build(Solution &s) unpaker.HeaderOnly = true; // not so simple targets - auto &script2txt = tools.addStaticLibrary("script2txt"); - script2txt += cpp20; - script2txt.setRootDirectory("src/script2txt"); - script2txt += "pub.lzwdgc.Polygon4.DataManager.schema-master"_dep; - gen_flex_bison_pair("org.sw.demo.lexxmark.winflexbison"_dep, script2txt, "LALR1_CPP_VARIANT_PARSER", "script2txt"); - if (script2txt.getCompilerType() == CompilerType::MSVC) - script2txt.CompileOptions.push_back("/Zc:__cplusplus"); + auto &script2txt = add_exe_with_common("script2txt"); + { + script2txt += ".*"_rr; + script2txt += "pub.lzwdgc.Polygon4.DataManager.schema-master"_dep; + gen_flex_bison_pair("org.sw.demo.lexxmark.winflexbison"_dep, script2txt, "LALR1_CPP_VARIANT_PARSER", "script2txt"); + if (script2txt.getCompilerType() == CompilerType::MSVC) + script2txt.CompileOptions.push_back("/Zc:__cplusplus"); + } auto &model = tools.addStaticLibrary("model"); - model += cpp20; - model.setRootDirectory("src/model"); - model.Public += common, - "org.sw.demo.unicode.icu.i18n"_dep, - "org.sw.demo.eigen"_dep, - "pub.egorpugin.primitives.yaml"_dep, - "pub.egorpugin.primitives.sw.settings"_dep - ; + { + model += cpp20; + model.setRootDirectory("src/model"); + model.Public += common, + "org.sw.demo.unicode.icu.i18n"_dep, + "org.sw.demo.eigen"_dep, + "pub.egorpugin.primitives.yaml"_dep, + "pub.egorpugin.primitives.sw.settings"_dep + ; + } add_exe("mod_reader") += model;