mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-12 15:45:21 +08:00
b0a495c7d0
re: PR https://github.com/Unidata/netcdf-c/pull/2139 re: PR https://github.com/Unidata/netcdf-c/pull/2169 re: PR https://github.com/Unidata/netcdf-c/pull/2146 re: Issue https://github.com/Unidata/netcdf-c/issues/2119 Found the product tinyxml2 at https://github.com/leethomason/tinyxml2.git and replaced ezxml with it. Tinyxml2 is about twice the LOC of ezxml, but at least is it still being maintained, and I can use it out of the box. It is C++ rather than C, but we seem to have reached the point that we can include C++ code with only minor compile flag changes. Untested on Mac OS. Added instructions to the end of libncxml/Makefile.am on how to upgrade to a later version of tinyxml2. This PR obsoletes the use of ezxml (re PRs https://github.com/Unidata/netcdf-c/pull/2146 and https://github.com/Unidata/netcdf-c/issue/2119).
41 lines
985 B
Makefile
41 lines
985 B
Makefile
# WARNING: this is not the libxml2 library
|
|
# It comes from https://github.com/recp/xml
|
|
|
|
# Copyright 2009, UCAR/Unidata
|
|
# See the COPYRIGHT file for more information.
|
|
|
|
# Use automake or CMake for building under nix
|
|
# Use CMake for building under windows
|
|
|
|
# Get AM_CPPFLAGS and AM_LDFLAGS
|
|
|
|
include $(top_srcdir)/lib_flags.am
|
|
|
|
if ENABLE_LIBXML2
|
|
AM_CPPFLAGS += ${XML2FLAGS}
|
|
endif
|
|
|
|
# This is our output. The ZARR convenience library.
|
|
noinst_LTLIBRARIES = libncxml.la
|
|
libncxml_la_LIBADD =
|
|
libncxml_la_LDFLAGS =
|
|
|
|
if ENABLE_LIBXML2
|
|
libncxml_la_SOURCES = ncxml_xml2.c
|
|
else
|
|
AM_CXXFLAGS = -std=c++11
|
|
libncxml_la_SOURCES = ncxml_tinyxml2.cpp tinyxml2.cpp tinyxml2.h
|
|
endif
|
|
|
|
EXTRA_DIST = CMakeLists.txt license.txt
|
|
|
|
# Download the tinyxml2 source
|
|
REPO = https://github.com/leethomason/tinyxml2.git
|
|
tinyxml2::
|
|
rm -fr ./tinyxml2 ./license.txt
|
|
git clone --depth=1 ${REPO}
|
|
cat tinyxml2/tinyxml2.h > ./tinyxml2.h
|
|
cat tinyxml2/tinyxml2.cpp > ./tinyxml2.cpp
|
|
cat tinyxml2/LICENSE.txt > ./license.txt
|
|
|