From f76628b5bd998480af25197fd1ede033abe303e9 Mon Sep 17 00:00:00 2001 From: Nigel Stewart Date: Sun, 13 Jul 2014 23:41:45 +1000 Subject: [PATCH] GLEW Patch #66 - Fixups for pkg-config in MinGW build. --- Makefile | 15 +++++++++++---- glew.pc.in | 8 ++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 9fdac23..b45586c 100644 --- a/Makefile +++ b/Makefile @@ -40,11 +40,16 @@ else $(error "Platform '$(SYSTEM)' not supported") endif +GLEW_PREFIX ?= /usr GLEW_DEST ?= /usr BINDIR ?= $(GLEW_DEST)/bin LIBDIR ?= $(GLEW_DEST)/lib INCDIR ?= $(GLEW_DEST)/include/GL +ifneq ($(GLEW_NO_GLU), -DGLEW_NO_GLU) +LIBGLU = glu +endif + DIST_NAME ?= glew-$(GLEW_VERSION) DIST_SRC_ZIP ?= $(shell pwd)/$(DIST_NAME).zip DIST_SRC_TGZ ?= $(shell pwd)/$(DIST_NAME).tgz @@ -128,13 +133,14 @@ tmp/$(SYSTEM)/default/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wgl glew.pc: glew.pc.in sed \ - -e "s|@prefix@|$(GLEW_DEST)|g" \ + -e "s|@prefix@|$(GLEW_PREFIX)|g" \ -e "s|@libdir@|$(LIBDIR)|g" \ -e "s|@exec_prefix@|$(BINDIR)|g" \ -e "s|@includedir@|$(INCDIR)|g" \ -e "s|@version@|$(GLEW_VERSION)|g" \ -e "s|@cflags@||g" \ - -e "s|@libname@|GLEW|g" \ + -e "s|@libname@|$(NAME)|g" \ + -e "s|@requireslib@|$(LIBGLU)|g" \ < $< > $@ # GLEW MX static and shared libraries @@ -168,13 +174,14 @@ tmp/$(SYSTEM)/mx/shared/glew.o: src/glew.c include/GL/glew.h include/GL/wglew.h glewmx.pc: glew.pc.in sed \ - -e "s|@prefix@|$(GLEW_DEST)|g" \ + -e "s|@prefix@|$(GLEW_PREFIX)|g" \ -e "s|@libdir@|$(LIBDIR)|g" \ -e "s|@exec_prefix@|$(BINDIR)|g" \ -e "s|@includedir@|$(INCDIR)|g" \ -e "s|@version@|$(GLEW_VERSION)|g" \ -e "s|@cflags@|-DGLEW_MX|g" \ - -e "s|@libname@|GLEWmx|g" \ + -e "s|@libname@|$(NAME)mx|g" \ + -e "s|@requireslib@|$(LIBGLU)|g" \ < $< > $@ # GLEW utility programs diff --git a/glew.pc.in b/glew.pc.in index 4c934af..d7f30a6 100644 --- a/glew.pc.in +++ b/glew.pc.in @@ -1,11 +1,11 @@ prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include/GL Name: glew Description: The OpenGL Extension Wrangler library Version: @version@ Cflags: -I${includedir} @cflags@ Libs: -L${libdir} -l@libname@ -Requires: glu +Requires: @requireslib@