Files
lime/templates/cpp/static/BuildMain.xml
Tobiasz Laskowski 00edf47529 Add support for linking mbedtls on latest hxcpp
The latest hxcpp makes it easier to link against the internal mbedtls,
however we still need backwards compatibility.

https://github.com/HaxeFoundation/hxcpp/pull/1133
2025-02-10 09:24:47 -08:00

104 lines
2.6 KiB
XML

<xml>
<include name="${HXCPP}/build-tool/BuildCommon.xml" />
<include name="${HXCPP}/project/thirdparty/mbedtls-files.xml" noerror="true" />
<set name="HAS_HXCPP_MBEDTLS_FILES" value="1" if="MBEDTLS_DIR" />
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />
<files id="main">
<file name="Main.cpp" />
</files>
<target id="main" output="Main${DBG}" tool="linker" toolid="exe">
<files id="main" />
<files id="mbedtls" if="HAS_HXCPP_MBEDTLS_FILES" />
<files id="hxcpp_ssl" unless="HAS_HXCPP_MBEDTLS_FILES" />
::foreach ndlls::
<lib name="::path::" />::end::
<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="comsuppw.lib" />
<lib name="usp10.lib" />
<lib name="rpcrt4.lib" />
<lib name="dwrite.lib" />
<lib name="setupapi.lib" />
<lib name="crypt32.lib" />
</section>
<section if="linux">
<lib name="-lpthread" />
<lib name="-lrt" />
<lib name="-lgc" if="LIME_NEKO" />
<lib name="-lm" if="LIME_NEKO" />
</section>
<section if="mac">
<vflag name="-l" value="iconv"/>
<vflag name="-framework" value="IOKit" />
<vflag name="-framework" value="Foundation" />
<vflag name="-framework" value="CoreAudio" />
<vflag name="-framework" value="CoreVideo" />
<vflag name="-framework" value="Cocoa" />
<vflag name="-framework" value="OpenGL" />
<vflag name="-framework" value="AudioToolbox" />
<vflag name="-framework" value="AudioUnit" />
<vflag name="-framework" value="ForceFeedback" />
<vflag name="-framework" value="Carbon" />
<vflag name="-framework" value="AppKit" />
<vflag name="-framework" value="OpenAL"/>
<vflag name="-framework" value="SystemConfiguration"/>
<lib name="/opt/local/lib/libgc.a" if="LIME_NEKO" />
<lib name="-lm" if="LIME_NEKO" />
</section>
<section if="android">
<lib name="-Wl,--undefined=Java_org_libsdl_app_SDLActivity_nativeInit" if="LIME_SDL"/>
<lib name="-ldl" />
<lib name="-llog" />
<lib name="-landroid" />
<lib name="-lEGL" />
<lib name="-lGLESv2" />
<lib name="-lGLESv1_CM" />
<lib name="-lOpenSLES" />
</section>
<lib name="libApplicationMain${DBG}${LIBEXT}" />
</target>
<target id="default">
<target id="main" />
</target>
</xml>