diff options
author | jaseg <git@jaseg.de> | 2021-06-03 00:10:26 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2021-06-03 00:10:26 +0200 |
commit | de0f8516458578dbd9a38a965e21a1013cdcade2 (patch) | |
tree | 76ac11a8d7e380a5ad28d506ed9f431cd3d53df0 | |
parent | 6cca4a3278c30fb35e97dd0017c5a5a25a78bcf0 (diff) | |
download | gerbolyze-de0f8516458578dbd9a38a965e21a1013cdcade2.tar.gz gerbolyze-de0f8516458578dbd9a38a965e21a1013cdcade2.tar.bz2 gerbolyze-de0f8516458578dbd9a38a965e21a1013cdcade2.zip |
svg-flatten: build against submodule pugixml
-rw-r--r-- | svg-flatten/Makefile | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/svg-flatten/Makefile b/svg-flatten/Makefile index 30f3966..a980c05 100644 --- a/svg-flatten/Makefile +++ b/svg-flatten/Makefile @@ -28,7 +28,9 @@ SOURCES := src/svg_color.cpp \ src/nopencv.cpp \ $(UPSTREAM_DIR)/cpp-base64/base64.cpp -CLIPPER_SOURCES ?= $(UPSTREAM_DIR)/clipper-6.4.2/cpp/clipper.cpp +PUGIXML_SOURCES ?= $(UPSTREAM_DIR)/pugixml/src/pugixml.cpp +PUGIXML_INCLUDES ?= -I$(UPSTREAM_DIR)/pugixml/src +CLIPPER_SOURCES ?= $(UPSTREAM_DIR)/clipper-6.4.2/cpp/clipper.cpp CLIPPER_INCLUDES ?= -I$(UPSTREAM_DIR)/clipper-6.4.2/cpp VORONOI_INCLUDES ?= -I$(UPSTREAM_DIR)/voronoi/src POISSON_INCLUDES ?= -I$(UPSTREAM_DIR)/poisson-disk-sampling/thinks/poisson_disk_sampling/ @@ -42,12 +44,17 @@ STB_INCLUDES ?= -isystem$(UPSTREAM_DIR)/stb SOURCES += $(CLIPPER_SOURCES) INCLUDES := -Iinclude -Isrc $(CLIPPER_INCLUDES) $(VORONOI_INCLUDES) $(POISSON_INCLUDES) $(BASE64_INCLUDES) $(ARGAGG_INCLUDES) $(CAVC_INCLUDES) $(SUBPROCESS_INCLUDES) $(MINUNIT_INCLUDES) $(STB_INCLUDES) -PKG_CONFIG_DEPS := pugixml CXXFLAGS := -std=c++2a -g -Wall -Wextra -O0 -CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS)) - LDFLAGS := -lm -lc -lstdc++ -LDFLAGS += $(shell $(PKG_CONFIG) --libs $(PKG_CONFIG_DEPS)) + +PKG_CONFIG_DEPS := +ifdef USE_SYSTEM_PUGIXML + CXXFLAGS += $(shell $(PKG_CONFIG) --cflags pugixml) + LDFLAGS += $(shell $(PKG_CONFIG) --libs pugixml) +else + SOURCES += $(PUGIXML_SOURCES) + INCLUDES += $(PUGIXML_INCLUDES) +endif TARGET := svg-flatten |