commit 93938087656fcc0ebfe8270f38246a7cd280eb39 Author: Kornel Benko <kor...@lyx.org> Date: Thu Feb 20 15:20:50 2025 +0100
Cmake build: Add needed after 3eecbaee --- src/tests/CMakeLists.txt | 3 +- src/tests/dummy4checklayout.cpp | 63 +++++++++++++++++++++++++++++++++++++++++ src/tex2lyx/CMakeLists.txt | 2 +- 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index bde03f1b0d..93acfd4aa9 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -8,11 +8,12 @@ set(check_layout_SOURCES) foreach(_f insets/InsetLayout.cpp CiteEnginesList.cpp Color.cpp Counters.cpp Floating.cpp FloatList.cpp FontInfo.cpp Layout.cpp LayoutFile.cpp support/Lexer.cpp ModuleList.cpp Spacing.cpp TextClass.cpp tests/check_layout.cpp - tests/boost.cpp tests/dummy_functions.cpp) + tests/boost.cpp tests/dummy_functions.cpp tests/dummy4checklayout.cpp) list(APPEND check_layout_SOURCES "${TOP_SRC_DIR}/src/${_f}") endforeach() include_directories(${TOP_SRC_DIR}/src/support/tests) +include_directories(${TOP_SRC_DIR}/src/tex2lyx) add_executable(check_layout ${check_layout_SOURCES}) diff --git a/src/tests/dummy4checklayout.cpp b/src/tests/dummy4checklayout.cpp new file mode 100644 index 0000000000..afdcb490dc --- /dev/null +++ b/src/tests/dummy4checklayout.cpp @@ -0,0 +1,63 @@ +/** + * \file dummy_impl.cpp + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Jean-Marc Lasgouttes + * + * Full author contact details are available in file CREDITS. + */ + +/** + * This file contains dummy implementation of some methods that are + * needed by classes used by tex2lyx. This allows to reduce the number + * of classes we have to link against. +*/ + +// {[( + +#include <config.h> + +#include "tex2lyx.h" +#include "LaTeXColors.h" +#include "LaTeXFeatures.h" +#include "LyXRC.h" +#include "output_xhtml.h" +#include "xml.h" + +#include "support/Messages.h" + +#include <iostream> + +using namespace std; + +namespace lyx { + +// Make linker happy + +LaTeXColors & theLaTeXColors() +{ + LaTeXColors * lc = new LaTeXColors; + return * lc; +} + +// +// Dummy translation support (needed at many places) +// + +bool LaTeXColors::isLaTeXColor(string const & /* name */) +{ + return(false); +} + +LaTeXColors::TexColorMap LaTeXColors::getLaTeXColors() +{ + static TexColorMap texcolormap_; + return(texcolormap_); +} + +LaTeXColor LaTeXColors::getLaTeXColor(string const & name) +{ + return texcolormap_[name]; +} +} // namespace lyx diff --git a/src/tex2lyx/CMakeLists.txt b/src/tex2lyx/CMakeLists.txt index 9bf42ee0f6..8c0a09e640 100644 --- a/src/tex2lyx/CMakeLists.txt +++ b/src/tex2lyx/CMakeLists.txt @@ -14,7 +14,7 @@ foreach(_src graphics/GraphicsParams insets/ExternalTemplate insets/ExternalTransforms insets/InsetLayout Author CiteEnginesList Color Counters Encoding FloatList Floating FontInfo LaTeXPackages Layout LayoutFile LayoutModuleList support/Lexer ModuleList TextClass - Spacing version) + LaTeXColors Spacing version) list(APPEND LINKED_sources ${TOP_SRC_DIR}/src/${_src}.cpp) list(APPEND LINKED_headers ${TOP_SRC_DIR}/src/${_src}.h) endforeach(_src) -- lyx-cvs mailing list lyx-cvs@lists.lyx.org https://lists.lyx.org/mailman/listinfo/lyx-cvs