add irrlicht (#694)
* add irrlicht * update abseil * improve openssl * update libcurl * improve irrlicht * add tools for irrlichtpull/695/head
parent
10be5546d8
commit
05c2860a06
6 changed files with 114 additions and 9 deletions
@ -0,0 +1,68 @@ |
|||||||
|
set_project("irrlicht") |
||||||
|
|
||||||
|
add_rules("mode.debug", "mode.release") |
||||||
|
|
||||||
|
add_requires("bzip2", "libjpeg-turbo", "libpng", "zlib") |
||||||
|
if is_plat("macosx") then |
||||||
|
add_requires("libx11", "libxft") |
||||||
|
elseif is_plat("linux") then |
||||||
|
add_requires("libx11", "libxxf86vm", "libxcursor", "libxext", "libxft") |
||||||
|
end |
||||||
|
|
||||||
|
target("Irrlicht") |
||||||
|
set_kind("$(kind)") |
||||||
|
add_files("source/Irrlicht/*.cpp") |
||||||
|
add_files("source/Irrlicht/lzma/*.c") |
||||||
|
add_files("source/Irrlicht/aesGladman/*.cpp") |
||||||
|
add_includedirs("source/Irrlicht") |
||||||
|
add_includedirs("include", {public = true}) |
||||||
|
add_headerfiles("include/(**.h)") |
||||||
|
add_packages("bzip2", "libjpeg-turbo", "libpng", "zlib") |
||||||
|
add_defines(is_kind("shared") and "IRRLICHT_EXPORTS" or "_IRR_STATIC_LIB_", {public = is_kind("static")}) |
||||||
|
add_defines("NO_IRR_USE_NON_SYSTEM_ZLIB_", |
||||||
|
"NO_IRR_USE_NON_SYSTEM_BZLIB_", |
||||||
|
"NO_IRR_USE_NON_SYSTEM_JPEG_LIB_", |
||||||
|
"NO_IRR_USE_NON_SYSTEM_LIB_PNG_") |
||||||
|
add_defines("NO_IRR_COMPILE_WITH_DIRECT3D_9_", |
||||||
|
"NO_IRR_COMPILE_WITH_BURNINGSVIDEO_") |
||||||
|
if is_plat("windows") then |
||||||
|
add_syslinks("user32", "gdi32", "advapi32") |
||||||
|
elseif is_plat("macosx") then |
||||||
|
add_frameworks("Cocoa", "OpenGL", "IOKit") |
||||||
|
add_files("source/Irrlicht/MacOSX/*.mm") |
||||||
|
add_cxxflags("-ObjC++") |
||||||
|
set_values("objc++.build.arc", false) |
||||||
|
elseif is_plat("linux") then |
||||||
|
add_syslinks("GL") |
||||||
|
add_packages("libx11", "libxxf86vm", "libxcursor", "libxext") |
||||||
|
end |
||||||
|
target_end() |
||||||
|
|
||||||
|
target("MeshConverter") |
||||||
|
set_kind("binary") |
||||||
|
add_deps("Irrlicht") |
||||||
|
add_files("tools/MeshConverter/*.cpp") |
||||||
|
target_end() |
||||||
|
|
||||||
|
target("IrrFontTool") |
||||||
|
set_kind("binary") |
||||||
|
add_deps("Irrlicht") |
||||||
|
add_files("tools/IrrFontTool/newFontTool/*.cpp") |
||||||
|
if is_plat("windows") then |
||||||
|
add_syslinks("gdi32") |
||||||
|
elseif is_plat("macosx", "linux") then |
||||||
|
add_packages("libx11", "libxft") |
||||||
|
end |
||||||
|
target_end() |
||||||
|
|
||||||
|
target("GUIEditor") |
||||||
|
set_kind("binary") |
||||||
|
add_deps("Irrlicht") |
||||||
|
add_files("tools/GUIEditor/*.cpp") |
||||||
|
target_end() |
||||||
|
|
||||||
|
target("FileToHeader") |
||||||
|
set_kind("binary") |
||||||
|
add_deps("Irrlicht") |
||||||
|
add_files("tools/FileToHeader/*.cpp") |
||||||
|
target_end() |
@ -0,0 +1,40 @@ |
|||||||
|
package("irrlicht") |
||||||
|
|
||||||
|
set_homepage("https://irrlicht.sourceforge.io/") |
||||||
|
set_description("The Irrlicht Engine is an open source realtime 3D engine written in C++.") |
||||||
|
set_license("zlib") |
||||||
|
|
||||||
|
add_urls("https://downloads.sourceforge.net/irrlicht/irrlicht-$(version).zip") |
||||||
|
add_versions("1.8.5", "effb7beed3985099ce2315a959c639b4973aac8210f61e354475a84105944f3d") |
||||||
|
|
||||||
|
add_deps("bzip2", "libjpeg-turbo", "libpng", "zlib") |
||||||
|
if is_plat("windows") then |
||||||
|
add_syslinks("user32", "gdi32", "advapi32") |
||||||
|
elseif is_plat("macosx") then |
||||||
|
add_deps("libx11", "libxft") |
||||||
|
add_frameworks("Cocoa", "OpenGL", "IOKit") |
||||||
|
elseif is_plat("linux") then |
||||||
|
add_syslinks("GL") |
||||||
|
add_deps("libx11", "libxxf86vm", "libxcursor", "libxext", "libxft") |
||||||
|
end |
||||||
|
on_load("windows", "macosx", "linux", function (package) |
||||||
|
if not package:config("shared") then |
||||||
|
package:add("defines", "_IRR_STATIC_LIB_") |
||||||
|
end |
||||||
|
end) |
||||||
|
|
||||||
|
on_install("windows", "macosx", "linux", function (package) |
||||||
|
os.cp(path.join(os.scriptdir(), "port", "xmake.lua"), "xmake.lua") |
||||||
|
import("package.tools.xmake").install(package) |
||||||
|
end) |
||||||
|
|
||||||
|
on_test(function (package) |
||||||
|
assert(package:check_cxxsnippets({test = [[ |
||||||
|
void test() { |
||||||
|
using namespace irr; |
||||||
|
IrrlichtDevice *device = |
||||||
|
createDevice(video::EDT_SOFTWARE, core::dimension2d<u32>(640, 480), 16, |
||||||
|
false, false, false, 0); |
||||||
|
} |
||||||
|
]]}, {configs = {languages = "c++11"}, includes = "irrlicht.h"})) |
||||||
|
end) |
Loading…
Reference in new issue