package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.4 KiB
37 lines
1.4 KiB
package("tmxparser") |
|
|
|
set_homepage("https://github.com/sainteos/tmxparser") |
|
set_description("C++11 library for parsing the maps generated by Tiled Map Editor") |
|
|
|
set_urls("https://github.com/sainteos/tmxparser.git") |
|
add_versions("2.2.0", "d314b3115c7ed86a939eefcb6009a495f043a346") |
|
|
|
add_deps("zlib", "tinyxml2") |
|
|
|
on_install(function (package) |
|
io.gsub("include/Tmx.h.in", "@VERSION_MAJOR@", "2") |
|
io.gsub("include/Tmx.h.in", "@VERSION_MINOR@", "2") |
|
io.gsub("include/Tmx.h.in", "@VERSION_PATCH@", "0") |
|
os.mv("include/Tmx.h.in", "include/Tmx.h") |
|
io.writefile("xmake.lua", [[ |
|
add_requires("zlib", "tinyxml2") |
|
add_rules("mode.debug", "mode.release") |
|
target("tmxparser") |
|
set_kind("$(kind)") |
|
set_languages("cxx11") |
|
add_packages("zlib", "tinyxml2") |
|
add_headerfiles("include/**.h") |
|
add_includedirs("include", "include/base64") |
|
add_files("src/**.cpp") |
|
]]) |
|
import("package.tools.xmake").install(package, {kind = package:config("shared") and "shared" or "static"}) |
|
end) |
|
|
|
on_test(function (package) |
|
assert(package:check_cxxsnippets({test = [[ |
|
void test(int argc, char** argv) { |
|
Tmx::Map map; |
|
map.ParseFile("test.xml"); |
|
} |
|
]]}, {configss = {languages = "c++11"}, includes = "Tmx.h"})) |
|
end) |