Use system version of pugixml, not a checkouted one

This commit is contained in:
Grégory Soutadé 2023-01-08 21:12:38 +01:00
parent be78d24236
commit 84b01a5de3
6 changed files with 6 additions and 19 deletions

View File

@ -7,8 +7,8 @@ endif
UPDFPARSERLIB = ./lib/updfparser/libupdfparser.a UPDFPARSERLIB = ./lib/updfparser/libupdfparser.a
CXXFLAGS += -Wall -fPIC -I./include -I./lib/pugixml/src/ -I./lib/updfparser/include CXXFLAGS += -Wall -fPIC -I./include -I./usr/include/pugixml -I./lib/updfparser/include
LDFLAGS = $(UPDFPARSERLIB) LDFLAGS = $(UPDFPARSERLIB) -lpugixml
VERSION := $(shell cat include/libgourou.h |grep LIBGOUROU_VERSION|cut -d '"' -f2) VERSION := $(shell cat include/libgourou.h |grep LIBGOUROU_VERSION|cut -d '"' -f2)
@ -48,7 +48,7 @@ TARGETDIR := bin
SRCEXT := cpp SRCEXT := cpp
OBJEXT := o OBJEXT := o
SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/loan_token.cpp src/bytearray.cpp src/pugixml.cpp SOURCES = src/libgourou.cpp src/user.cpp src/device.cpp src/fulfillment_item.cpp src/loan_token.cpp src/bytearray.cpp
OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT))) OBJECTS := $(patsubst $(SRCDIR)/%,$(BUILDDIR)/%,$(SOURCES:.$(SRCEXT)=.$(OBJEXT)))
all: version lib obj $(TARGETS) all: version lib obj $(TARGETS)

View File

@ -48,6 +48,7 @@ For utils :
* libcurl * libcurl
* OpenSSL * OpenSSL
* libzip * libzip
* libpugixml
Internal libraries are automatically fetched and statically compiled during the first run. Internal libraries are automatically fetched and statically compiled during the first run.

View File

@ -1,13 +1,5 @@
#!/bin/bash #!/bin/bash
# Pugixml
if [ ! -d lib/pugixml ] ; then
git clone https://github.com/zeux/pugixml.git lib/pugixml
pushd lib/pugixml
git checkout latest
popd
fi
# uPDFParser # uPDFParser
if [ ! -d lib/updfparser ] ; then if [ ! -d lib/updfparser ] ; then
git clone git://soutade.fr/updfparser.git lib/updfparser git clone git://soutade.fr/updfparser.git lib/updfparser

View File

@ -1,17 +1,12 @@
#!/bin/bash #!/bin/bash
if [ ! -d lib/pugixml -o ! -d lib/updfparser ] ; then if [ ! -d lib/updfparser ] ; then
echo "Some libraries are missing" echo "Some libraries are missing"
echo "You must run this script at the top of libgourou working direcotry." echo "You must run this script at the top of libgourou working direcotry."
echo "./lib/setup.sh must be called first (make all)" echo "./lib/setup.sh must be called first (make all)"
exit 1 exit 1
fi fi
# Pugixml
pushd lib/pugixml
git pull origin latest
popd
# uPDFParser # uPDFParser
pushd lib/updfparser pushd lib/updfparser
git pull origin master git pull origin master

View File

@ -1 +0,0 @@
../lib/pugixml/src/pugixml.cpp

View File

@ -5,7 +5,7 @@ TARGETS=$(TARGET_BINARIES) launcher
CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/ CXXFLAGS=-Wall -fPIC -I$(ROOT)/include -I$(ROOT)/lib/pugixml/src/
STATIC_DEP= STATIC_DEP=
LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl LDFLAGS += -L$(ROOT) -lcrypto -lzip -lz -lcurl -lpugixml
ifneq ($(STATIC_UTILS),) ifneq ($(STATIC_UTILS),)
STATIC_DEP = $(ROOT)/libgourou.a STATIC_DEP = $(ROOT)/libgourou.a