aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/Makefile
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-02-27 20:08:48 +0100
committerjaseg <git@jaseg.de>2021-02-27 20:08:48 +0100
commit3d2aefe4d9ffd0fbe7c0fa84575e2101b96a75eb (patch)
treeff40208c501fe8a57078fbfbccc811d3b55d828e /svg-flatten/Makefile
parent901efc75c6fb7d31a4549f876f8b780f2728ae28 (diff)
downloadgerbolyze-3d2aefe4d9ffd0fbe7c0fa84575e2101b96a75eb.tar.gz
gerbolyze-3d2aefe4d9ffd0fbe7c0fa84575e2101b96a75eb.tar.bz2
gerbolyze-3d2aefe4d9ffd0fbe7c0fa84575e2101b96a75eb.zip
Vendor pugixml
Diffstat (limited to 'svg-flatten/Makefile')
-rw-r--r--svg-flatten/Makefile14
1 files changed, 11 insertions, 3 deletions
diff --git a/svg-flatten/Makefile b/svg-flatten/Makefile
index 25c8048..6bdb663 100644
--- a/svg-flatten/Makefile
+++ b/svg-flatten/Makefile
@@ -26,18 +26,26 @@ SOURCES := src/svg_color.cpp \
$(UPSTREAM_DIR)/cpp-base64/base64.cpp
CLIPPER_SOURCES ?= $(UPSTREAM_DIR)/clipper-6.4.2/cpp/clipper.cpp $(UPSTREAM_DIR)/clipper-6.4.2/cpp/cpp_cairo/cairo_clipper.cpp
+PUGIXML_SOURCES ?= $(UPSTREAM_DIR)/pugixml/src/pugixml.cpp
CLIPPER_INCLUDES ?= -I$(UPSTREAM_DIR)/clipper-6.4.2/cpp -I$(UPSTREAM_DIR)/clipper-6.4.2/cpp/cpp_cairo/
VORONOI_INCLUDES ?= -I$(UPSTREAM_DIR)/voronoi/src
POISSON_INCLUDES ?= -I$(UPSTREAM_DIR)/poisson-disk-sampling/thinks/poisson_disk_sampling/
BASE64_INCLUDES ?= -I$(UPSTREAM_DIR)/cpp-base64
ARGAGG_INCLUDES ?= -I$(UPSTREAM_DIR)/argagg/include/argagg
CAVC_INCLUDES ?= -I$(UPSTREAM_DIR)/CavalierContours/include/cavc/
+# the folder name is subprocess.h
SUBPROCESS_INCLUDES ?= -I$(UPSTREAM_DIR)/subprocess.h
+# make sure this appears after -Isvg-flatten/src on the compiler cmdline so pugixml loads the correct config
+PUGIXML_INCLUDES ?= -I$(UPSTREAM_DIR)/pugixml/src
+
+DEP_INCLUDES := $(CLIPPER_INCLUDES) $(VORONOI_INCLUDES) $(POISSON_INCLUDES) $(BASE64_INCLUDES) $(ARGAGG_INCLUDES)\
+ $(CAVC_INCLUDES) $(SUBPROCESS_INCLUDES) $(PUGIXML_INCLUDES)
SOURCES += $(CLIPPER_SOURCES)
-INCLUDES := -Iinclude -Isrc $(CLIPPER_INCLUDES) $(VORONOI_INCLUDES) $(POISSON_INCLUDES) $(BASE64_INCLUDES) $(ARGAGG_INCLUDES) $(CAVC_INCLUDES) $(SUBPROCESS_INCLUDES)
+SOURCES += $(PUGIXML_SOURCES)
+INCLUDES := -Iinclude -Isrc $(DEP_INCLUDES)
-PKG_CONFIG_DEPS := pangocairo pugixml
+PKG_CONFIG_DEPS := cairo
CXXFLAGS := -std=c++2a -g -Wall -Wextra -O0
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS))
# hack for stone age opencv in debian stable
@@ -56,7 +64,7 @@ all: $(BUILDDIR)/$(TARGET)
.PHONY: check-deps
check-deps:
@echo
- @$(PKG_CONFIG) --cflags --libs pangocairo pugixml >/dev/null
+ @$(PKG_CONFIG) --cflags --libs cairo >/dev/null
# debian hack. see above.
@$(PKG_CONFIG) --cflags --libs opencv4 >/dev/null ||$(PKG_CONFIG) --cflags --libs opencv >/dev/null