parent
18733f813e
commit
961c91c84d
6 changed files with 124 additions and 5 deletions
@ -0,0 +1,13 @@ |
||||
diff --git a/dom/src/dae/daeURI.cpp b/dom/src/dae/daeURI.cpp
|
||||
index 3a8f815..1623753 100644
|
||||
--- a/dom/src/dae/daeURI.cpp
|
||||
+++ b/dom/src/dae/daeURI.cpp
|
||||
@@ -790,7 +790,7 @@
|
||||
scheme = fromRange(uri.scheme);
|
||||
authority = fromRange(uri.hostText);
|
||||
path = fromList(uri.pathHead, "/");
|
||||
- if (uri.absolutePath != URI_TRUE and uri.hostText.first == NULL)
|
||||
+ if (uri.absolutePath != URI_TRUE && uri.hostText.first == NULL)
|
||||
path = path.erase(0, 1);
|
||||
query = fromRange(uri.query);
|
||||
fragment = fromRange(uri.fragment);
|
@ -0,0 +1,43 @@ |
||||
add_rules("mode.debug", "mode.release") |
||||
add_requires("boost", {configs = {filesystem = true}}) |
||||
add_requires("libxml2", "minizip", "pcre", "uriparser") |
||||
|
||||
option("common") |
||||
set_default(true) |
||||
if is_plat("windows") then |
||||
add_defines("WIN32") |
||||
if is_kind("shared") then |
||||
add_defines("DOM_DYNAMIC", "DOM_EXPORT") |
||||
end |
||||
end |
||||
set_languages("cxx11") |
||||
add_defines("DOM_INCLUDE_LIBXML", "USE_URIPARSER") |
||||
|
||||
target("collada-dom") |
||||
set_kind("$(kind)") |
||||
add_files("src/dae/*.cpp") |
||||
add_files("src/modules/*/*.cpp") |
||||
add_includedirs("include") |
||||
add_headerfiles("include/(*.h)") |
||||
add_headerfiles("include/(dae/*.h)") |
||||
add_headerfiles("include/(modules/*.h)") |
||||
add_options("common") |
||||
add_packages("pcre", "boost", "libxml2", "minizip", "uriparser") |
||||
|
||||
target("colladadom141") |
||||
set_kind("static") |
||||
add_deps("collada-dom") |
||||
add_files("src/1.4/dom/*.cpp") |
||||
add_includedirs("include") |
||||
add_headerfiles("include/(1.4/dom/*.h)") |
||||
add_options("common") |
||||
add_packages("pcre", "boost") |
||||
|
||||
target("colladadom150") |
||||
set_kind("static") |
||||
add_deps("collada-dom") |
||||
add_files("src/1.5/dom/*.cpp") |
||||
add_includedirs("include") |
||||
add_headerfiles("include/(1.5/dom/*.h)") |
||||
add_options("common") |
||||
add_packages("pcre", "boost") |
@ -0,0 +1,34 @@ |
||||
package("collada-dom") |
||||
|
||||
set_homepage("https://github.com/rdiankov/collada-dom/") |
||||
set_description("COLLADA Document Object Model (DOM) C++ Library") |
||||
|
||||
add_urls("https://github.com/rdiankov/collada-dom/archive/refs/tags/$(version).tar.gz", |
||||
"https://github.com/rdiankov/collada-dom.git") |
||||
add_versions("v2.5.0", "3be672407a7aef60b64ce4b39704b32816b0b28f61ebffd4fbd02c8012901e0d") |
||||
|
||||
add_patches("v2.5.0", path.join(os.scriptdir(), "patches", "v2.5.0", "uriparser.patch"), "b3ab281d5f4498531ff387992f731f94c64d7f8ea07674f66ad74ba455f650ef") |
||||
|
||||
add_deps("cmake", "libxml2", "minizip", "pcre", "uriparser") |
||||
add_deps("boost", {configs = {filesystem = true}}) |
||||
on_load("windows", function (package) |
||||
if package:config("shared") then |
||||
package:add("defines", "DOM_DYNAMIC") |
||||
end |
||||
end) |
||||
|
||||
on_install("windows", "linux", "macosx", function (package) |
||||
os.cd("dom") |
||||
os.cp(path.join(os.scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||
local configs = {} |
||||
if package:config("shared") then |
||||
configs.kind = "shared" |
||||
elseif package:is_plat("linux") and package:config("pic") ~= false then |
||||
configs.cxflags = "-fPIC" |
||||
end |
||||
import("package.tools.xmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cxxtypes("DAE", {configs = {languages = "c++11"}, includes = "dae.h"})) |
||||
end) |
@ -0,0 +1,29 @@ |
||||
package("tinyxml") |
||||
|
||||
set_homepage("https://sourceforge.net/projects/tinyxml/") |
||||
set_description("TinyXML is a simple, small, minimal, C++ XML parser that can be easily integrating into other programs.") |
||||
set_license("zlib") |
||||
|
||||
add_urls("https://jaist.dl.sourceforge.net/project/tinyxml/tinyxml/$(version).zip", {version = function (version) return version .. "/tinyxml_" .. version:gsub("%.", "_") end}) |
||||
add_versions("2.6.2", "ac6bb9501c6f50cc922d22f26b02fab168db47521be5e845b83d3451a3e1d512") |
||||
|
||||
on_install(function (package) |
||||
io.writefile("xmake.lua", [[ |
||||
add_rules("mode.debug", "mode.release") |
||||
target("tinyxml") |
||||
set_kind("$(kind)") |
||||
add_files("tinyxml.cpp", "tinystr.cpp", "tinyxmlerror.cpp", "tinyxmlparser.cpp") |
||||
add_headerfiles("tinyxml.h", "tinystr.h") |
||||
]]) |
||||
local configs = {} |
||||
if not package:is_plat("windows") and package:config("shared") then |
||||
configs.kind = "shared" |
||||
elseif package:is_plat("linux") and package:config("pic") ~= false then |
||||
configs.cxflags = "-fPIC" |
||||
end |
||||
import("package.tools.xmake").install(package, configs) |
||||
end) |
||||
|
||||
on_test(function (package) |
||||
assert(package:has_cxxtypes("TiXmlDocument", {includes = "tinyxml.h"})) |
||||
end) |
Loading…
Reference in new issue