kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #38305
[PATCH] Add legacy_gal implied include dirs
Hi,
The legacy_gal target doesn't add include/legacy_gal as a PUBLIC
include dir. This means:
* Targets have to specify it themselves and
* Its own files have to specify it manually too
This is at odds with how legacy_wx does it and adds complexity to
targets using legacy_gal (complexity which will need to be undone when
legacy_wx is removed).
Cheers,
John
From 04b3153d78614eb4617f3cf70b07ea1eae483a61 Mon Sep 17 00:00:00 2001
From: John Beard <john.j.beard@xxxxxxxxx>
Date: Wed, 7 Nov 2018 11:34:12 +0000
Subject: [PATCH 1/2] Include directories are implied by legacy_gal linkage
This avoids having to manually specify include/legacy_gal
in and legacy GAL targets, and harominizes with legacy_wx.
This also means .cpp files in common/legacy_gal do not
need to specify the legacy_gal subdirectory, so they
will continue to work as needed when legacy_wx is removed.
---
common/CMakeLists.txt | 1 +
common/legacy_gal/block.cpp | 2 +-
common/legacy_gal/eda_draw_frame.cpp | 2 +-
common/legacy_gal/other.cpp | 3 +--
eeschema/CMakeLists.txt | 1 -
5 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt
index f511fd449..924599753 100644
--- a/common/CMakeLists.txt
+++ b/common/CMakeLists.txt
@@ -88,6 +88,7 @@ add_library( legacy_gal STATIC ${LEGACY_GAL_SRCS} )
add_library( legacy_wx STATIC ${LEGACY_WX_SRCS} )
target_include_directories( legacy_wx PUBLIC ../include/legacy_wx )
+target_include_directories( legacy_gal PUBLIC ../include/legacy_gal )
target_link_libraries( gal
${GLEW_LIBRARIES}
diff --git a/common/legacy_gal/block.cpp b/common/legacy_gal/block.cpp
index 15621610b..b6a6a98bb 100644
--- a/common/legacy_gal/block.cpp
+++ b/common/legacy_gal/block.cpp
@@ -34,7 +34,7 @@
#include <macros.h>
#include <base_struct.h>
#include <base_screen.h>
-#include <legacy_gal/class_drawpanel.h>
+#include <class_drawpanel.h>
#include <confirm.h>
#include <block_commande.h>
diff --git a/common/legacy_gal/eda_draw_frame.cpp b/common/legacy_gal/eda_draw_frame.cpp
index 926c25fff..cd033a84e 100644
--- a/common/legacy_gal/eda_draw_frame.cpp
+++ b/common/legacy_gal/eda_draw_frame.cpp
@@ -35,7 +35,7 @@
#include <bitmaps.h>
#include <macros.h>
#include <id.h>
-#include <legacy_gal/class_drawpanel.h>
+#include <class_drawpanel.h>
#include <base_screen.h>
#include <msgpanel.h>
#include <draw_frame.h>
diff --git a/common/legacy_gal/other.cpp b/common/legacy_gal/other.cpp
index 918a77a7a..7fe3938ff 100644
--- a/common/legacy_gal/other.cpp
+++ b/common/legacy_gal/other.cpp
@@ -3,7 +3,7 @@
#include "base_screen.h"
#include "common.h"
#include "macros.h"
-#include "legacy_gal/class_drawpanel.h"
+#include "class_drawpanel.h"
#include "marker_base.h"
#include "dialog_display_info_HTML_base.h"
@@ -12,5 +12,4 @@
void MARKER_BASE::DrawMarker( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GR_DRAWMODE aDrawMode,
const wxPoint& aOffset )
{
-
}
diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
index 6a3cb8856..2f53e84de 100644
--- a/eeschema/CMakeLists.txt
+++ b/eeschema/CMakeLists.txt
@@ -20,7 +20,6 @@ endif()
include_directories( BEFORE ${INC_BEFORE} )
include_directories(
- ../include/legacy_gal
./dialogs
./netlist_exporters
./widgets
--
2.19.1
Follow ups