Commit 478e674c authored by mercury233's avatar mercury233 Committed by GitHub

build irrlicht with premake on macos (#2771)

parent 69e7807b
...@@ -314,12 +314,6 @@ jobs: ...@@ -314,12 +314,6 @@ jobs:
run: | run: |
git clone --depth=1 https://github.com/mercury233/irrlicht git clone --depth=1 https://github.com/mercury233/irrlicht
- name: Build irrlicht
run: |
cd irrlicht/source/Irrlicht/MacOSX
xcodebuild -project MacOSX.xcodeproj
cd ../../../..
- name: Copy premake files - name: Copy premake files
run: | run: |
cp -r premake/* . cp -r premake/* .
...@@ -331,9 +325,7 @@ jobs: ...@@ -331,9 +325,7 @@ jobs:
./premake5 gmake \ ./premake5 gmake \
--cc=clang \ --cc=clang \
--no-use-irrklang \ --no-use-irrklang \
--freetype-include-dir="/usr/local/include/freetype2" \ --freetype-include-dir="/usr/local/include/freetype2"
--irrlicht-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
- name: Use premake to generate make files (ARM64) - name: Use premake to generate make files (ARM64)
if: runner.arch == 'ARM64' if: runner.arch == 'ARM64'
...@@ -346,9 +338,7 @@ jobs: ...@@ -346,9 +338,7 @@ jobs:
--freetype-include-dir="/opt/homebrew/include/freetype2" \ --freetype-include-dir="/opt/homebrew/include/freetype2" \
--freetype-lib-dir="/opt/homebrew/lib" \ --freetype-lib-dir="/opt/homebrew/lib" \
--sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \ --sqlite-include-dir="/opt/homebrew/opt/sqlite/include" \
--sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib" \ --sqlite-lib-dir="/opt/homebrew/opt/sqlite/lib"
--irrlicht-include-dir="../irrlicht/include" \
--irrlicht-lib-dir="../irrlicht/source/Irrlicht/MacOSX/build/Release"
- name: Make - name: Make
run: | run: |
......
...@@ -156,3 +156,15 @@ project "irrlicht" ...@@ -156,3 +156,15 @@ project "irrlicht"
filter { "system:linux" } filter { "system:linux" }
links { "X11", "Xxf86vm" } links { "X11", "Xxf86vm" }
filter { "system:macosx" }
cppdialect "gnu++14"
defines { "GL_SILENCE_DEPRECATION", "PNG_ARM_NEON_OPT=0", "PNG_ARM_NEON_IMPLEMENTATION=0" }
undefines { "NO_IRR_COMPILE_WITH_JOYSTICK_EVENTS_" }
files {
"source/Irrlicht/MacOSX/*.mm",
"source/Irrlicht/MacOSX/*.h",
}
filter { "system:macosx", "files:source/Irrlicht/Irrlicht.cpp or source/Irrlicht/COpenGLDriver.cpp" }
compileas "Objective-C++"
...@@ -4,7 +4,7 @@ BUILD_LUA = true ...@@ -4,7 +4,7 @@ BUILD_LUA = true
BUILD_EVENT = os.istarget("windows") BUILD_EVENT = os.istarget("windows")
BUILD_FREETYPE = os.istarget("windows") BUILD_FREETYPE = os.istarget("windows")
BUILD_SQLITE = os.istarget("windows") BUILD_SQLITE = os.istarget("windows")
BUILD_IRRLICHT = not os.istarget("macosx") BUILD_IRRLICHT = true
USE_IRRKLANG = true USE_IRRKLANG = true
IRRKLANG_PRO = false IRRKLANG_PRO = false
LUA_LIB_NAME = "lua" LUA_LIB_NAME = "lua"
...@@ -166,7 +166,6 @@ workspace "YGOPro" ...@@ -166,7 +166,6 @@ workspace "YGOPro"
filter "system:macosx" filter "system:macosx"
libdirs { "/usr/local/lib" } libdirs { "/usr/local/lib" }
buildoptions { "-stdlib=libc++" }
if MAC_ARM then if MAC_ARM then
buildoptions { "--target=arm64-apple-macos12" } buildoptions { "--target=arm64-apple-macos12" }
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment