mirror of
https://github.com/holub/mame
synced 2025-04-16 13:34:55 +03:00
Added possibility of building using system pugixml
This commit is contained in:
parent
4419ff325a
commit
9a154947d1
5
makefile
5
makefile
@ -68,6 +68,7 @@
|
||||
# USE_SYSTEM_LIB_UTF8PROC = 1
|
||||
# USE_SYSTEM_LIB_GLM = 1
|
||||
# USE_SYSTEM_LIB_RAPIDJSON = 1
|
||||
# USE_SYSTEM_LIB_PUGIXML = 1
|
||||
|
||||
# MESA_INSTALL_ROOT = /opt/mesa
|
||||
# SDL_INSTALL_ROOT = /opt/sdl2
|
||||
@ -480,6 +481,10 @@ ifdef USE_SYSTEM_LIB_RAPIDJSON
|
||||
PARAMS += --with-system-rapidjson='$(USE_SYSTEM_LIB_RAPIDJSON)'
|
||||
endif
|
||||
|
||||
ifdef USE_SYSTEM_LIB_PUGIXML
|
||||
PARAMS += --with-system-pugixml='$(USE_SYSTEM_LIB_PUGIXML)'
|
||||
endif
|
||||
|
||||
# reverse logic for this one
|
||||
|
||||
ifdef USE_BUNDLED_LIB_SDL2
|
||||
|
@ -18,6 +18,7 @@ local extlibs = {
|
||||
utf8proc = { "utf8proc", "3rdparty/utf8proc" },
|
||||
glm = { "glm", "3rdparty/glm" },
|
||||
rapidjson = { "rapidjson", "3rdparty/rapidjson/include" },
|
||||
pugixml = { "pugixml", "3rdparty/pugixml/src" },
|
||||
}
|
||||
|
||||
-- system lib options
|
||||
@ -81,6 +82,11 @@ newoption {
|
||||
description = "Use system rapidjson library",
|
||||
}
|
||||
|
||||
newoption {
|
||||
trigger = "with-system-pugixml",
|
||||
description = "Use system pugixml library",
|
||||
}
|
||||
|
||||
-- build helpers
|
||||
function ext_lib(lib)
|
||||
local opt = _OPTIONS["with-system-" .. lib]
|
||||
|
@ -671,6 +671,16 @@ if not _OPTIONS["with-system-flac"]~=nil then
|
||||
}
|
||||
end
|
||||
|
||||
if not _OPTIONS["with-system-pugixml"] then
|
||||
defines {
|
||||
"PUGIXML_HEADER_ONLY",
|
||||
}
|
||||
else
|
||||
links {
|
||||
ext_lib("pugixml"),
|
||||
}
|
||||
end
|
||||
|
||||
if _OPTIONS["NOASM"]=="1" then
|
||||
defines {
|
||||
"MAME_NOASM"
|
||||
|
@ -35,6 +35,7 @@ includedirs {
|
||||
ext_includedir("flac"),
|
||||
ext_includedir("jpeg"),
|
||||
ext_includedir("rapidjson"),
|
||||
ext_includedir("pugixml"),
|
||||
}
|
||||
|
||||
files {
|
||||
|
@ -14,8 +14,7 @@
|
||||
#include "emuopts.h"
|
||||
#include "hash.h"
|
||||
#include "drivenum.h"
|
||||
#define PUGIXML_HEADER_ONLY
|
||||
#include "pugixml/src/pugixml.hpp"
|
||||
#include <pugixml.hpp>
|
||||
|
||||
/*-------------------------------------------------
|
||||
hashfile_lookup
|
||||
|
Loading…
Reference in New Issue
Block a user