aboutsummaryrefslogtreecommitdiff
path: root/svg-flatten/Makefile
diff options
context:
space:
mode:
authorjaseg <git@jaseg.de>2021-02-06 00:05:27 +0100
committerjaseg <git@jaseg.de>2021-02-06 00:05:27 +0100
commit8c494f77361a6774a30ee86a86c40c4bdeeda83a (patch)
treeef709f17fa7a82ec9424078b4f7a269cd8778873 /svg-flatten/Makefile
parentbf428103d3a05289f66a6215374515dc98e46a14 (diff)
downloadgerbolyze-8c494f77361a6774a30ee86a86c40c4bdeeda83a.tar.gz
gerbolyze-8c494f77361a6774a30ee86a86c40c4bdeeda83a.tar.bz2
gerbolyze-8c494f77361a6774a30ee86a86c40c4bdeeda83a.zip
Work on fedora/debian compatibility
Diffstat (limited to 'svg-flatten/Makefile')
-rw-r--r--svg-flatten/Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/svg-flatten/Makefile b/svg-flatten/Makefile
index bb35aed..88619fc 100644
--- a/svg-flatten/Makefile
+++ b/svg-flatten/Makefile
@@ -37,12 +37,16 @@ SUBPROCESS_INCLUDES ?= -I$(UPSTREAM_DIR)/subprocess.h
SOURCES += $(CLIPPER_SOURCES)
INCLUDES := -Iinclude -Isrc $(CLIPPER_INCLUDES) $(VORONOI_INCLUDES) $(POISSON_INCLUDES) $(BASE64_INCLUDES) $(ARGAGG_INCLUDES) $(CAVC_INCLUDES) $(SUBPROCESS_INCLUDES)
-PKG_CONFIG_DEPS := pangocairo pugixml opencv4
+PKG_CONFIG_DEPS := pangocairo pugixml
CXXFLAGS := -std=c++2a -g -Wall -Wextra -O0
CXXFLAGS += $(shell $(PKG_CONFIG) --cflags $(PKG_CONFIG_DEPS))
+# hack for stone age opencv in debian stable
+CXXFLAGS += $(shell $(PKG_CONFIG) --cflags opencv4 2> /dev/null || $(PKG_CONFIG) --cflags opencv 2>/dev/null)
LDFLAGS := -lm -lc -lstdc++
LDFLAGS += $(shell $(PKG_CONFIG) --libs $(PKG_CONFIG_DEPS))
+# debian hack. see above.
+LDFLAGS += $(shell $(PKG_CONFIG) --libs opencv4 2> /dev/null || $(PKG_CONFIG) --libs opencv 2>/dev/null)
TARGET := svg-flatten
@@ -51,7 +55,9 @@ all: $(BUILDDIR)/$(TARGET)
.PHONY: check-deps
check-deps:
@echo
- @$(PKG_CONFIG) --cflags --libs $(PKG_CONFIG_DEPS) >/dev/null
+ @$(PKG_CONFIG) --cflags --libs pangocairo pugixml >/dev/null
+ # debian hack. see above.
+ @$(PKG_CONFIG) --cflags --libs opencv4 >/dev/null ||$(PKG_CONFIG) --cflags --libs opencv >/dev/null
$(BUILDDIR)/%.o: %.cpp
@mkdir -p $(dir $@)
@@ -59,7 +65,7 @@ $(BUILDDIR)/%.o: %.cpp
$(BUILDDIR)/$(TARGET): $(SOURCES:%.cpp=$(BUILDDIR)/%.o)
@mkdir -p $(dir $@)
- $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lstdc++fs
.PHONY: install
install: