Files
lime/project/Build.xml
Josh Tynjala 8f0b8f356e Application: onDisplayOrientation and onDeviceOrientation events for iOS and Android
Device orientation is the orientation of the phone/tablet.

Display orientation is the orientation of what is rendered on the display.

By default, they should usually be the same. If orientation is locked, device orientation will update, but display orientation usually won't.
2025-01-29 09:38:00 -08:00

574 lines
19 KiB
XML
Executable File

<xml>
<set name="PLATFORM" value="android-21" if="android" />
<set name="HXCPP_CPP11" value="1" />
<include name="${HXCPP}/build-tool/BuildCommon.xml" />
<set name="ios" value="1" if="iphone" />
<set name="tvos" value="1" if="appletv" />
<set name="LIME_CAIRO" value="1" />
<set name="LIME_CURL" value="1" unless="winrt" />
<set name="LIME_EFSW" value="1" if="windows || mac || linux" unless="winrt" />
<set name="LIME_JPEG" value="1" />
<!-- <set name="LIME_FAUDIO" value="1" /> -->
<set name="LIME_FREETYPE" value="1" />
<set name="LIME_HARFBUZZ" value="1" unless="winrt" />
<!-- <set name="LIME_HASHLINK" value="1" if="windows || mac || linux" /> -->
<set name="LIME_HASHLINK" value="1" if="hashlink" />
<set name="LIME_LZMA" value="1" />
<set name="LIME_MBEDTLS" value="1" unless="emscripten || winrt" />
<!-- <set name="LIME_NEKO" value="1" if="linux" /> -->
<set name="LIME_OGG" value="1" />
<set name="LIME_OPENALSOFT" value="1" if="windows || linux || mac || android" unless="static_link" />
<set name="LIME_OPENAL" value="1" if="iphone || webassembly || tvos" />
<set name="LIME_MOJOAL" value="1" if="switch || static_link || winrt || mojoal" unless="LIME_OPENAL" />
<unset name="LIME_OPENALSOFT" if="LIME_MOJOAL" />
<set name="LIME_OPENAL" value="1" if="LIME_OPENALSOFT" />
<set name="LIME_OPENAL" value="1" if="LIME_MOJOAL" />
<set name="LIME_OPENGL" value="1" />
<set name="LIME_PIXMAN" value="1" />
<set name="LIME_PNG" value="1" />
<set name="LIME_SDL" value="1" />
<!-- <set name="LIME_SDL_ANGLE" value="1" if="windows" unless="static_link" /> -->
<set name="LIME_SDL_ANGLE" value="1" if="windows LIME_SDL_ANGLE" unless="static_link" />
<set name="LIME_SDL_ANGLE" value="1" if="windows angle" unless="static_link" />
<set name="LIME_SDL_ANGLE" value="1" if="winrt" />
<set name="LIME_TINYFILEDIALOGS" value="1" if="windows || mac || linux" unless="winrt || emscripten" />
<set name="LIME_VORBIS" value="1" />
<!-- <set name="LIME_VPX" value="1" />
<set name="LIME_WEBM" value="1" /> -->
<set name="LIME_ZLIB" value="1" />
<set name="OUTPUT_DIR" value="../ndll" unless="OUTPUT_DIR" />
<set name="NATIVE_TOOLKIT_PATH" value="lib" unless="NATIVE_TOOLKIT_PATH" />
<set name="NATIVE_TOOLKIT_HAVE_CAIRO" value="1" if="LIME_CAIRO" />
<set name="NATIVE_TOOLKIT_HAVE_FREETYPE" value="1" if="LIME_FREETYPE" />
<set name="NATIVE_TOOLKIT_HAVE_HARFBUZZ" value="1" if="LIME_HARFBUZZ" />
<set name="NATIVE_TOOLKIT_HAVE_MBEDTLS" value="1" if="LIME_MBEDTLS" />
<set name="NATIVE_TOOLKIT_HAVE_PNG" value="1" if="LIME_PNG" />
<set name="NATIVE_TOOLKIT_HAVE_SDL" value="1" if="LIME_SDL" />
<set name="NATIVE_TOOLKIT_SDL_STATIC" value="1" />
<set name="NATIVE_TOOLKIT_SDL_ANGLE" value="1" if="LIME_SDL_ANGLE" />
<files id="lime">
<compilerflag value="-Iinclude" />
<file name="src/ExternalInterface.cpp" />
<section if="LIME_CAIRO">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/cairo/src/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/cairo/configs/default/" unless="windows || mac || linux" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/cairo/configs/linux/" if="linux" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/cairo/configs/windows/" if="windows" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/cairo/configs/mac/" if="mac" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/cairo/src/" />
<compilerflag value="-DLIME_CAIRO" />
<compilerflag value="-DHAVE_CONFIG_H" />
<compilerflag value="-DCAIRO_WIN32_STATIC_BUILD" if="windows" />
<compilerflag value="-DCAIRO_HAS_FT_FONT" />
<file name="src/graphics/cairo/CairoBindings.cpp" />
</section>
<section if="LIME_CURL">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/curl/include/" />
<compilerflag value="-DLIME_CURL" />
<compilerflag value="-DCURL_STATICLIB" />
<file name="src/net/curl/CURLBindings.cpp" />
</section>
<section if="LIME_EFSW">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/efsw/include/" />
<compilerflag value="-DLIME_EFSW" />
<file name="src/system/FileWatcher.cpp" />
</section>
<section if="LIME_FAUDIO">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/faudio/src" />
<compilerflag value="-DLIME_FAUDIO" />
<!-- <file name="src/graphics/format/PNG.cpp" /> -->
</section>
<section if="LIME_FREETYPE">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/freetype/include" />
<compilerflag value="-DLIME_FREETYPE" />
<!--
prefer FreeType's font metrics algorithm from 2.9.1
it behaves more like SWF than the new algorithm
-->
<compilerflag value="-DLIME_FREETYPE_LEGACY_METRICS" />
<file name="src/text/Font.cpp" />
<section if="LIME_HARFBUZZ">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/harfbuzz/src" />
<compilerflag value="-DLIME_HARFBUZZ" />
<file name="src/text/harfbuzz/HarfbuzzBindings.cpp" />
</section>
</section>
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/hashlink/src" />
<section if="LIME_HASHLINK">
<compilerflag value="-DLIME_HASHLINK" />
</section>
<section unless="LIME_HASHLINK">
<compilerflag value="-DLIBHL_EXPORTS" />
</section>
<section if="LIME_JPEG">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/jpeg/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/jpeg/" />
<compilerflag value="-DLIME_JPEG" />
<file name="src/graphics/format/JPEG.cpp" />
</section>
<section if="LIME_LZMA">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/lzma/src" />
<compilerflag value="-DLIME_LZMA" />
<file name="src/utils/compress/LZMA.cpp" />
</section>
<section if="LIME_NEKO">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/neko/vm/" />
<compilerflag value="-DLIME_NEKO" />
<file name="src/vm/NekoVM.cpp" />
</section>
<section if="LIME_OGG">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/ogg/include/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/ogg/include/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/vorbis/include/" />
<compilerflag value="-DLIME_OGG" />
<file name="src/media/containers/OGG.cpp" />
</section>
<section if="LIME_OPENAL">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/openal/include/" unless="LIME_MOJOAL || emscripten" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/mojoal/" if="LIME_MOJOAL" />
<compilerflag value="-DLIME_OPENAL" />
<compilerflag value="-DLIME_OPENALSOFT" if="LIME_OPENALSOFT" />
<compilerflag value="-DLIME_MOJOAL" if="LIME_MOJOAL" />
<compilerflag value="-DAL_LIBTYPE_STATIC=1" if="LIME_OPENALSOFT || LIME_MOJOAL" />
<compilerflag value="-DAL_ALEXT_PROTOTYPES" if="LIME_OPENALSOFT" />
<file name="src/media/openal/OpenALBindings.cpp" />
</section>
<section if="LIME_OPENGL">
<compilerflag value="-DLIME_OPENGL" />
<compilerflag value="-I${DEVELOPER_DIR}/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS${TVOS_VER}.sdk/" if="tvos" />
<file name="src/graphics/opengl/OpenGLBindings.cpp" />
</section>
<section if="LIME_PNG">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/custom/png/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/png/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/zlib/" />
<compilerflag value="-DLIME_PNG" />
<file name="src/graphics/format/PNG.cpp" />
</section>
<section if="LIME_SDL">
<section if="emscripten">
<compilerflag value="-s" />
<compilerflag value="USE_SDL=2" />
</section>
<section unless="emscripten">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include/configs/default/" unless="windows || mac || linux || rpi" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include/configs/linux/" if="linux" unless="rpi" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include/configs/windows/" if="windows" unless="winrt" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include/configs/mac/" if="mac" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include/configs/rpi/" if="rpi" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/sdl/include/configs/winrt/" if="winrt" />
<compilerflag value="-DHAVE_LIBC" />
</section>
<section if="rpi">
<compilerflag value="-I/usr/include/libdrm" />
<compilerflag value="-I/usr/include/dbus-1.0" />
<compilerflag value="-I/usr/lib/arm-linux-gnueabihf/dbus-1.0/include" unless="HXCPP_ARM64" />
<compilerflag value="-I/usr/lib/aarch64-linux-gnu/dbus-1.0/include" if="HXCPP_ARM64" />
<compilerflag value="-I/usr/local/include" />
<compilerflag value="-ldrm" />
<compilerflag value="-lgbm" />
<compilerflag value="-Wl,--no-undefined -lm -ldl -ldrm -lpthread -lrt" />
</section>
<compilerflag value="-DLIME_SDL" />
<compilerflag value="-DNATIVE_TOOLKIT_SDL_ANGLE" if="NATIVE_TOOLKIT_SDL_ANGLE" />
<compilerflag value="-D__IPHONEOS__" if="ios || tvos" />
<compilerflag value="-D__APPLETVOS__" if="tvos" />
<compilerflag value="-DAPPLETV" if="tvos" />
<compilerflag value="-DHAVE_STDIO_H" unless="windows" />
<file name="src/backend/sdl/SDLApplication.cpp" />
<file name="src/backend/sdl/SDLGamepad.cpp" />
<file name="src/backend/sdl/SDLJoystick.cpp" />
<file name="src/backend/sdl/SDLKeyCode.cpp" />
<file name="src/backend/sdl/SDLMutex.cpp" />
<file name="src/backend/sdl/SDLSystem.cpp" />
<file name="src/backend/sdl/SDLWindow.cpp" />
</section>
<section if="LIME_TINYFILEDIALOGS">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/tinyfiledialogs/" />
<compilerflag value="-DLIME_TINYFILEDIALOGS" />
<file name="src/ui/FileDialog.cpp" />
</section>
<section if="LIME_VORBIS">
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/ogg/include/" />
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/vorbis/include/" />
<compilerflag value="-DLIME_VORBIS" />
<file name="src/media/codecs/vorbis/VorbisBindings.cpp" />
<file name="src/media/codecs/vorbis/VorbisFile.cpp" />
</section>
<section if="LIME_ZLIB">
<compilerflag value="-DSTATIC_LINK" if="emscripten || ios || tvos" />
<compilerflag value="-DLIME_ZLIB" />
<file name="src/utils/compress/Zlib.cpp" />
</section>
<file name="src/app/ApplicationEvent.cpp" />
<file name="src/graphics/Image.cpp" />
<file name="src/graphics/ImageBuffer.cpp" />
<file name="src/graphics/RenderEvent.cpp" />
<file name="src/graphics/utils/ImageDataUtil.cpp" />
<file name="src/hx/CFFIExt.cpp" />
<file name="src/math/ColorMatrix.cpp" />
<file name="src/math/Matrix3.cpp" />
<file name="src/math/Rectangle.cpp" />
<file name="src/math/Vector2.cpp" />
<file name="src/media/AudioBuffer.cpp" />
<file name="src/media/containers/WAV.cpp" />
<file name="src/system/CFFI.cpp" />
<file name="src/system/CFFIPointer.cpp" />
<file name="src/system/ClipboardEvent.cpp" />
<file name="src/system/DisplayMode.cpp" />
<file name="src/system/JNI.cpp" if="android" />
<file name="src/system/Locale.cpp" unless="mac || ios" />
<file name="src/system/Locale.mm" if="mac || ios" />
<file name="src/system/OrientationEvent.cpp" />
<file name="src/system/SensorEvent.cpp" />
<file name="src/system/System.cpp" unless="ios" />
<file name="src/system/System.mm" if="ios" />
<file name="src/system/ValuePointer.cpp" />
<file name="src/ui/DropEvent.cpp" />
<file name="src/ui/GamepadEvent.cpp" />
<file name="src/ui/Haptic.mm" if="ios" />
<file name="src/ui/JoystickEvent.cpp" />
<file name="src/ui/KeyEvent.cpp" />
<file name="src/ui/MouseEvent.cpp" />
<file name="src/ui/TextEvent.cpp" />
<file name="src/ui/TouchEvent.cpp" />
<file name="src/ui/WindowEvent.cpp" />
<file name="src/utils/ArrayBufferView.cpp" />
<file name="src/utils/Bytes.cpp" />
</files>
<files id="android-cpufeatures">
<compilerflag value="-I${ANDROID_NDK_ROOT}/sources/android/cpufeatures" if="android" />
<file name="${ANDROID_NDK_ROOT}/sources/android/cpufeatures/cpu-features.c" />
</files>
<!-- Run setup now so the submodule projects can determine whether clang or GCC will be used. -->
<!-- TODO: if https://github.com/HaxeFoundation/hxcpp/issues/930 ever gets resolved, use that instead. -->
<setup name="androidNdk" if="android" />
<include name="lib/cairo-files.xml" />
<include name="lib/curl-files.xml" />
<include name="lib/efsw-files.xml" />
<include name="lib/faudio-files.xml" if="LIME_FAUDIO" />
<include name="lib/freetype-files.xml" />
<include name="lib/harfbuzz-files.xml" />
<include name="lib/jpeg-files.xml" />
<include name="lib/lzma-files.xml" />
<include name="lib/mbedtls-files.xml" />
<include name="lib/mojoal-files.xml" />
<include name="lib/neko-files.xml" />
<include name="lib/ogg-files.xml" />
<include name="lib/openal-files.xml" />
<include name="lib/pixman-files.xml" />
<include name="lib/png-files.xml" />
<include name="lib/sdl-files.xml" />
<include name="lib/tinyfiledialogs-files.xml" />
<include name="lib/vorbis-files.xml" />
<include name="lib/vpx-files.xml" />
<include name="lib/webm-files.xml" />
<include name="lib/zlib-files.xml" />
<set name="DEBUGEXTRA" value="-debug" if="fulldebug" />
<set name="LIBSUFFIX" value="${HX_TARGET_SUFFIX}" if="HX_TARGET_SUFFIX" />
<set name="LIBSUFFIX" value="${LIBEXTRA}" unless="LIBSUFFIX" />
<target id="lime" output="${LIBPREFIX}lime${DEBUGEXTRA}${LIBSUFFIX}" tool="linker" toolid="${STD_MODULE_LINK}">
<outdir name="${OUTPUT_DIR}/${BINDIR}" />
<files id="lime" />
<files id="android-cpufeatures" if="android" />
<files id="native-toolkit-cairo" if="LIME_CAIRO" />
<files id="native-toolkit-curl" if="LIME_CURL" />
<files id="native-toolkit-efsw" if="LIME_EFSW" />
<files id="native-toolkit-faudio" if="LIME_FAUDIO" />
<files id="native-toolkit-freetype" if="LIME_FREETYPE" />
<files id="native-toolkit-harfbuzz" if="LIME_HARFBUZZ" />
<files id="native-toolkit-jpeg" if="LIME_JPEG" />
<files id="native-toolkit-lzma" if="LIME_LZMA" />
<files id="native-toolkit-mbedtls" if="LIME_MBEDTLS" />
<files id="native-toolkit-mojoal" if="LIME_MOJOAL" />
<files id="native-toolkit-neko" if="LIME_NEKO" />
<files id="native-toolkit-ogg" if="LIME_OGG" />
<files id="native-toolkit-openal" if="LIME_OPENALSOFT" />
<files id="native-toolkit-pixman" if="LIME_PIXMAN" />
<files id="native-toolkit-png" if="LIME_PNG" />
<files id="native-toolkit-sdl" if="LIME_SDL" unless="emscripten" />
<files id="native-toolkit-tinyfiledialogs" if="LIME_TINYFILEDIALOGS" />
<files id="native-toolkit-vorbis" if="LIME_VORBIS" />
<files id="native-toolkit-vpx" if="LIME_VPX" />
<files id="native-toolkit-webm" if="LIME_WEBM" />
<files id="native-toolkit-zlib" if="LIME_ZLIB" />
<section unless="static_link">
<ext value=".so" />
<ext value=".ndll" if="windows || mac || linux" />
<!-- TODO: Support single binary -->
<ext value=".hdll" if="LIME_HASHLINK" />
<section if="windows">
<lib name="gdi32.lib" />
<lib name="opengl32.lib" />
<lib name="user32.lib" />
<lib name="kernel32.lib" />
<lib name="advapi32.lib" />
<lib name="winmm.lib" />
<lib name="imm32.lib" />
<lib name="ole32.lib" />
<lib name="oleaut32.lib" />
<lib name="version.lib" />
<lib name="ws2_32.lib" />
<lib name="wldap32.lib" />
<lib name="shell32.lib" />
<lib name="comdlg32.lib" />
<lib name="setupapi.lib" />
<lib name="usp10.lib" if="LIME_HARFBUZZ" />
<lib name="rpcrt4.lib" if="LIME_HARFBUZZ" />
<lib name="dwrite.lib" if="LIME_HARFBUZZ" />
<lib name="comsuppw.lib" unless="winrt" />
<lib name="D3D11.lib" if="winrt" />
<lib name="RuntimeObject.lib" if="winrt" />
<lib name="Xinput.lib" if="winrt" />
<lib name="DXGI.lib" if="winrt" />
<lib name="-libpath:../templates/bin/hl/${BINDIR}" if="LIME_HASHLINK" />
<lib name="libhl.lib" if="LIME_HASHLINK" />
<!-- <lib name="-delayload:libhl.dll" /> -->
</section>
<section if="linux">
<lib name="-lpthread" />
<lib name="-lrt" />
<lib name="-lgc" if="LIME_NEKO" />
<lib name="-lm" if="LIME_NEKO" />
<lib name="-L../templates/bin/hl/${BINDIR}" if="LIME_HASHLINK" />
<lib name="-lhl" if="LIME_HASHLINK" />
</section>
<section if="mac">
<vflag name="-install_name" value="@executable_path/lime.hdll" if="LIME_HASHLINK"/>
<!--
starting in xcode 15, rpath doesn't automatically include
/usr/local/lib, but we need it for neko
-->
<vflag name="-rpath" value="/usr/local/lib" />
<vflag name="-rpath" value="/opt/homebrew/lib" if="HXCPP_ARM64"/>
<vflag name="-l" value="iconv" />
<vflag name="-framework" value="IOKit" />
<vflag name="-framework" value="Foundation" />
<vflag name="-framework" value="AppKit" />
<vflag name="-framework" value="AudioToolbox" />
<vflag name="-framework" value="AudioUnit" />
<vflag name="-framework" value="Carbon" />
<vflag name="-framework" value="Cocoa" />
<vflag name="-framework" value="CoreAudio" />
<vflag name="-framework" value="CoreVideo" />
<vflag name="-framework" value="ForceFeedback" />
<vflag name="-framework" value="OpenAL" />
<vflag name="-framework" value="OpenGL" />
<vflag name="-framework" value="SystemConfiguration" />
<lib name="/opt/local/lib/libgc.a" if="LIME_NEKO" />
<lib name="-lm" if="LIME_NEKO" />
<lib name="-L../templates/bin/hl/${BINDIR}" if="LIME_HASHLINK" />
<lib name="-lhl" if="LIME_HASHLINK" />
</section>
<section if="android">
<lib name="-L../ndll/Android" />
<lib name="-ldl" />
<lib name="-llog" />
<lib name="-landroid" />
<lib name="-lm" />
<lib name="-lEGL" />
<lib name="-lGLESv2" />
<lib name="-lGLESv1_CM" />
<lib name="-lOpenSLES" />
</section>
<section if="rpi">
<lib name="-ldl" />
<lib name="-ldrm" />
<lib name="-lm" />
<lib name="-lEGL" />
<lib name="-lGLESv2" />
</section>
<section if="tvos">
<vflag name="-framework" value="UIKit" />
<vflag name="-framework" value="Foundation" />
<vflag name="-framework" value="AudioToolbox" />
<vflag name="-framework" value="AudioUnit" />
<vflag name="-framework" value="CoreAudio" />
<vflag name="-framework" value="CoreVideo" />
<vflag name="-framework" value="GameController" />
<vflag name="-framework" value="OpenAL" />
<vflag name="-framework" value="OpenGLES" />
<!-- <vflag name="-framework" value="CoreBluetooth" /> -->
<lib name="-ldl" />
<lib name="-lEGL" />
<lib name="-lGLESv3" />
</section>
<section if="ios">
<vflag name="-framework" value="UIKit" />
<vflag name="-framework" value="Foundation" />
<vflag name="-framework" value="AudioToolbox" />
<vflag name="-framework" value="AudioUnit" />
<vflag name="-framework" value="CoreAudio" />
<vflag name="-framework" value="CoreMotion" />
<vflag name="-framework" value="CoreText" />
<vflag name="-framework" value="CoreVideo" />
<vflag name="-framework" value="OpenAL" />
<vflag name="-framework" value="OpenGLES" />
<!-- <vflag name="-framework" value="CoreBluetooth" /> -->
<lib name="-ldl" />
<lib name="-lEGL" />
<lib name="-lGLESv3" />
</section>
</section>
</target>
<include name="../legacy/project/Build.xml" if="lime-legacy" />
<target id="default">
<target id="lime" unless="lime-legacy" />
<target id="lime-legacy" if="lime-legacy" />
</target>
<copyFile name="lime.lib" from="obj/lib/" overwrite="true" toolId="dll" if="windows LIME_HASHLINK" />
</xml>