Option to use system, instead of built-in, expat
At least one Linux distribution packager of FG has complained that we're bundling expat in our binaries. To keep them happy, add the option (-DSYSTEM_EXPAT=1 at cmake time) to use the system expat instead. For the moment (and simplicity), this requires building SIMGEAR_SHARED (which is fired to on by selecting the option).
This commit is contained in:
+24
-19
@@ -7,26 +7,31 @@ set(HEADERS
|
||||
)
|
||||
|
||||
set(SOURCES
|
||||
asciitab.h
|
||||
hashtable.h
|
||||
iasciitab.h
|
||||
latin1tab.h
|
||||
nametab.h
|
||||
utf8tab.h
|
||||
xmldef.h
|
||||
xmlparse.h
|
||||
xmlrole.h
|
||||
xmltok.h
|
||||
xmltok_impl.h
|
||||
hashtable.c
|
||||
xmlparse.c
|
||||
xmlrole.c
|
||||
xmltok.c
|
||||
easyxml.cxx
|
||||
internal.h
|
||||
ascii.h
|
||||
expat.h
|
||||
expat_external.h
|
||||
)
|
||||
|
||||
if (NOT SYSTEM_EXPAT)
|
||||
list(APPEND SOURCES
|
||||
asciitab.h
|
||||
hashtable.h
|
||||
iasciitab.h
|
||||
latin1tab.h
|
||||
nametab.h
|
||||
utf8tab.h
|
||||
xmldef.h
|
||||
xmlparse.h
|
||||
xmlrole.h
|
||||
xmltok.h
|
||||
xmltok_impl.h
|
||||
hashtable.c
|
||||
xmlparse.c
|
||||
xmlrole.c
|
||||
xmltok.c
|
||||
internal.h
|
||||
ascii.h
|
||||
expat.h
|
||||
expat_external.h
|
||||
)
|
||||
endif()
|
||||
|
||||
simgear_component(xml xml "${SOURCES}" "${HEADERS}")
|
||||
|
||||
+11
-2
@@ -4,13 +4,22 @@
|
||||
* This file is in the Public Domain, and comes with NO WARRANTY of any kind.
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <simgear_config.h>
|
||||
#endif
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
|
||||
#include <string.h> // strcmp()
|
||||
|
||||
#include "easyxml.hxx"
|
||||
#include "xmlparse.h"
|
||||
|
||||
|
||||
#ifdef SYSTEM_EXPAT
|
||||
# include <expat.h>
|
||||
#else
|
||||
# include "xmlparse.h"
|
||||
#endif
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user