From 26a52ecfe96b3614a5135ac76ad5a3201ebbb2a2 Mon Sep 17 00:00:00 2001 From: Alex Shvartzkop Date: Fri, 18 Aug 2023 15:55:01 +0300 Subject: [PATCH] Move parts of import_gfx to common. --- common/CMakeLists.txt | 12 ++++++++++++ {pcbnew => common}/import_gfx/dxf_import_plugin.cpp | 0 {pcbnew => common}/import_gfx/dxf_import_plugin.h | 0 .../import_gfx/examples/basic_ellipses.dxf | 0 .../import_gfx/examples/test_outlines.dxf | 0 .../import_gfx/graphics_import_mgr.cpp | 0 {pcbnew => common}/import_gfx/graphics_import_mgr.h | 0 .../import_gfx/graphics_import_plugin.h | 0 {pcbnew => common}/import_gfx/graphics_importer.cpp | 0 {pcbnew => common}/import_gfx/graphics_importer.h | 0 .../import_gfx/graphics_importer_buffer.cpp | 0 .../import_gfx/graphics_importer_buffer.h | 0 {pcbnew => common}/import_gfx/svg_import_plugin.cpp | 0 {pcbnew => common}/import_gfx/svg_import_plugin.h | 0 pcbnew/CMakeLists.txt | 11 ----------- pcbnew/import_gfx/dialog_import_gfx.cpp | 2 +- pcbnew/import_gfx/graphics_importer_pcbnew.h | 2 +- 17 files changed, 14 insertions(+), 13 deletions(-) rename {pcbnew => common}/import_gfx/dxf_import_plugin.cpp (100%) rename {pcbnew => common}/import_gfx/dxf_import_plugin.h (100%) rename {pcbnew => common}/import_gfx/examples/basic_ellipses.dxf (100%) rename {pcbnew => common}/import_gfx/examples/test_outlines.dxf (100%) rename {pcbnew => common}/import_gfx/graphics_import_mgr.cpp (100%) rename {pcbnew => common}/import_gfx/graphics_import_mgr.h (100%) rename {pcbnew => common}/import_gfx/graphics_import_plugin.h (100%) rename {pcbnew => common}/import_gfx/graphics_importer.cpp (100%) rename {pcbnew => common}/import_gfx/graphics_importer.h (100%) rename {pcbnew => common}/import_gfx/graphics_importer_buffer.cpp (100%) rename {pcbnew => common}/import_gfx/graphics_importer_buffer.h (100%) rename {pcbnew => common}/import_gfx/svg_import_plugin.cpp (100%) rename {pcbnew => common}/import_gfx/svg_import_plugin.h (100%) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 8c23a6004e..035e5b090e 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -284,6 +284,14 @@ set( FONT_SRCS font/text_attributes.cpp ) +set( COMMON_IMPORT_GFX_SRCS + import_gfx/graphics_import_mgr.cpp + import_gfx/graphics_importer.cpp + import_gfx/graphics_importer_buffer.cpp + import_gfx/dxf_import_plugin.cpp + import_gfx/svg_import_plugin.cpp + ) + set( COMMON_SRCS ${LIB_KICAD_SRCS} ${COMMON_ABOUT_DLG_SRCS} @@ -296,6 +304,7 @@ set( COMMON_SRCS ${PLUGINS_CADSTAR_SRCS} ${PLUGINS_EAGLE_SRCS} ${FONT_SRCS} + ${COMMON_IMPORT_GFX_SRCS} jobs/job_dispatcher.cpp advanced_config.cpp array_axis.cpp @@ -496,6 +505,9 @@ target_link_libraries( common core fmt::fmt gal + nanosvg + dxflib_qcad + tinyspline_lib scripting threadpool nlohmann_json diff --git a/pcbnew/import_gfx/dxf_import_plugin.cpp b/common/import_gfx/dxf_import_plugin.cpp similarity index 100% rename from pcbnew/import_gfx/dxf_import_plugin.cpp rename to common/import_gfx/dxf_import_plugin.cpp diff --git a/pcbnew/import_gfx/dxf_import_plugin.h b/common/import_gfx/dxf_import_plugin.h similarity index 100% rename from pcbnew/import_gfx/dxf_import_plugin.h rename to common/import_gfx/dxf_import_plugin.h diff --git a/pcbnew/import_gfx/examples/basic_ellipses.dxf b/common/import_gfx/examples/basic_ellipses.dxf similarity index 100% rename from pcbnew/import_gfx/examples/basic_ellipses.dxf rename to common/import_gfx/examples/basic_ellipses.dxf diff --git a/pcbnew/import_gfx/examples/test_outlines.dxf b/common/import_gfx/examples/test_outlines.dxf similarity index 100% rename from pcbnew/import_gfx/examples/test_outlines.dxf rename to common/import_gfx/examples/test_outlines.dxf diff --git a/pcbnew/import_gfx/graphics_import_mgr.cpp b/common/import_gfx/graphics_import_mgr.cpp similarity index 100% rename from pcbnew/import_gfx/graphics_import_mgr.cpp rename to common/import_gfx/graphics_import_mgr.cpp diff --git a/pcbnew/import_gfx/graphics_import_mgr.h b/common/import_gfx/graphics_import_mgr.h similarity index 100% rename from pcbnew/import_gfx/graphics_import_mgr.h rename to common/import_gfx/graphics_import_mgr.h diff --git a/pcbnew/import_gfx/graphics_import_plugin.h b/common/import_gfx/graphics_import_plugin.h similarity index 100% rename from pcbnew/import_gfx/graphics_import_plugin.h rename to common/import_gfx/graphics_import_plugin.h diff --git a/pcbnew/import_gfx/graphics_importer.cpp b/common/import_gfx/graphics_importer.cpp similarity index 100% rename from pcbnew/import_gfx/graphics_importer.cpp rename to common/import_gfx/graphics_importer.cpp diff --git a/pcbnew/import_gfx/graphics_importer.h b/common/import_gfx/graphics_importer.h similarity index 100% rename from pcbnew/import_gfx/graphics_importer.h rename to common/import_gfx/graphics_importer.h diff --git a/pcbnew/import_gfx/graphics_importer_buffer.cpp b/common/import_gfx/graphics_importer_buffer.cpp similarity index 100% rename from pcbnew/import_gfx/graphics_importer_buffer.cpp rename to common/import_gfx/graphics_importer_buffer.cpp diff --git a/pcbnew/import_gfx/graphics_importer_buffer.h b/common/import_gfx/graphics_importer_buffer.h similarity index 100% rename from pcbnew/import_gfx/graphics_importer_buffer.h rename to common/import_gfx/graphics_importer_buffer.h diff --git a/pcbnew/import_gfx/svg_import_plugin.cpp b/common/import_gfx/svg_import_plugin.cpp similarity index 100% rename from pcbnew/import_gfx/svg_import_plugin.cpp rename to common/import_gfx/svg_import_plugin.cpp diff --git a/pcbnew/import_gfx/svg_import_plugin.h b/common/import_gfx/svg_import_plugin.h similarity index 100% rename from pcbnew/import_gfx/svg_import_plugin.h rename to common/import_gfx/svg_import_plugin.h diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 136f50c1be..8f862116ba 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -197,12 +197,7 @@ set( PCBNEW_BRDSTACKUP_MGR set( PCBNEW_IMPORT_GFX import_gfx/dialog_import_gfx_base.cpp import_gfx/dialog_import_gfx.cpp - import_gfx/graphics_import_mgr.cpp - import_gfx/graphics_importer.cpp import_gfx/graphics_importer_pcbnew.cpp - import_gfx/graphics_importer_buffer.cpp - import_gfx/dxf_import_plugin.cpp - import_gfx/svg_import_plugin.cpp ) @@ -628,9 +623,6 @@ target_link_libraries( pcbnew_kiface_objects PRIVATE common core - dxflib_qcad - nanosvg - tinyspline_lib nlohmann_json rectpack2d gzip-hpp @@ -676,10 +668,7 @@ set( PCBNEW_KIFACE_LIBRARIES gal scripting core - dxflib_qcad - tinyspline_lib idf3 - nanosvg markdown_lib ${PCBNEW_IO_LIBRARIES} ${wxWidgets_LIBRARIES} diff --git a/pcbnew/import_gfx/dialog_import_gfx.cpp b/pcbnew/import_gfx/dialog_import_gfx.cpp index 1abb4ed61b..85f588fedf 100644 --- a/pcbnew/import_gfx/dialog_import_gfx.cpp +++ b/pcbnew/import_gfx/dialog_import_gfx.cpp @@ -25,6 +25,7 @@ #include #include "dialog_import_gfx.h" +#include #include #include #include @@ -33,7 +34,6 @@ #include #include #include -#include "dxf_import_plugin.h" #include #include diff --git a/pcbnew/import_gfx/graphics_importer_pcbnew.h b/pcbnew/import_gfx/graphics_importer_pcbnew.h index c312c3f9aa..d66042be57 100644 --- a/pcbnew/import_gfx/graphics_importer_pcbnew.h +++ b/pcbnew/import_gfx/graphics_importer_pcbnew.h @@ -27,7 +27,7 @@ #ifndef GRAPHICS_IMPORTER_PCBNEW_H #define GRAPHICS_IMPORTER_PCBNEW_H -#include "graphics_importer.h" +#include #include