Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support pkg-config when mapnik-config is not available #60

Open
sebastic opened this issue Jun 17, 2024 · 0 comments
Open

Support pkg-config when mapnik-config is not available #60

sebastic opened this issue Jun 17, 2024 · 0 comments

Comments

@sebastic
Copy link

sebastic commented Jun 17, 2024

The CMake build of Mapnik 4.0.0 doesn't provide mapnik-config, it does provide pkg-config support.

This patch is used in the Debian package to use pkg-config unconditionally:

--- a/backend-mapnik/Makefile
+++ b/backend-mapnik/Makefile
@@ -1,8 +1,7 @@
 INSTALLOPTS=-g root -o root
-CFLAGS += -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
-CXXFLAGS = `mapnik-config --cflags` $(CFLAGS)
+CXXFLAGS += `pkg-config --cflags libmapnik` -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
 CXXFLAGS += -Wall -Wextra -pedantic -Wredundant-decls -Wdisabled-optimization -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo -Wold-style-cast
-LDFLAGS= `mapnik-config --libs --ldflags --dep-libs`
+LDFLAGS += `pkg-config --libs libmapnik` -lboost_filesystem

 backend-mapnik: renderd.o metatilehandler.o networklistener.o networkmessage.o networkrequest.o networkresponse.o debuggable.o requesthandler.o
        $(CXX) -o $@ $^ $(LDFLAGS)

Some heuristics to determine which to use might be in order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant