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
This commit is contained in:
committed by
Josh Tynjala
parent
6bfbe12df3
commit
00edf47529
@@ -1,5 +1,7 @@
|
||||
<xml>
|
||||
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" />
|
||||
<include name="${HXCPP}/project/thirdparty/mbedtls_files.xml" noerror="true" if="static_link"/>
|
||||
<set name="HAS_HXCPP_MBEDTLS_FLAGS" value="1" if="MBEDTLS_DIR" />
|
||||
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="MBEDTLS_DIR"/>
|
||||
|
||||
<files id="native-toolkit-curl-depends" >
|
||||
<depend name="${NATIVE_TOOLKIT_PATH}/curl/include/curl/curl.h" />
|
||||
@@ -28,10 +30,16 @@
|
||||
<compilerflag value="-I${NATIVE_TOOLKIT_PATH}/mbedtls/include" if="NATIVE_TOOLKIT_HAVE_MBEDTLS" unless="static_link"/>
|
||||
<section if="static_link">
|
||||
|
||||
<compilerflag value="-I${MBEDTLS_DIR}/include" />
|
||||
<compilerflag value="-I${HXCPP}/src/hx/libs/ssl" />
|
||||
<compilerflag value="-I${this_dir}/custom/mbedtls_hxcpp" />
|
||||
<compilerflag value="-DMBEDTLS_USER_CONFIG_FILE=<mbedtls_config.h>" />
|
||||
<include name="${HXCPP}/project/thirdparty/mbedtls_flags.xml" if="HAS_HXCPP_MBEDTLS_FLAGS" />
|
||||
|
||||
<section unless="HAS_HXCPP_MBEDTLS_FLAGS">
|
||||
|
||||
<compilerflag value="-I${MBEDTLS_DIR}/include" />
|
||||
<compilerflag value="-I${HXCPP}/src/hx/libs/ssl" />
|
||||
<compilerflag value="-I${this_dir}/custom/mbedtls_hxcpp" />
|
||||
<compilerflag value="-DMBEDTLS_USER_CONFIG_FILE=<mbedtls_config.h>" />
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
|
||||
<include name="${HXCPP}/build-tool/BuildCommon.xml" />
|
||||
|
||||
<include name="${HXCPP}/src/hx/libs/ssl/Build.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">
|
||||
|
||||
@@ -13,7 +15,8 @@
|
||||
<target id="main" output="Main${DBG}" tool="linker" toolid="exe">
|
||||
|
||||
<files id="main" />
|
||||
<files id="hxcpp_ssl" />
|
||||
<files id="mbedtls" if="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
<files id="hxcpp_ssl" unless="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
::foreach ndlls::
|
||||
<lib name="::path::" />::end::
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<xml>
|
||||
|
||||
<include name="${HXCPP}/build-tool/BuildCommon.xml" />
|
||||
<include name="${HXCPP}/src/hx/libs/ssl/Build.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}/build-tool/BuildCommon.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
|
||||
<target id="default" output="libmbedtls_hxcpp${DBG}" tool="linker" toolid="static_link">
|
||||
|
||||
<files id="hxcpp_ssl" />
|
||||
<files id="mbedtls" if="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
<files id="hxcpp_ssl" unless="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<xml>
|
||||
|
||||
<include name="${HXCPP}/build-tool/BuildCommon.xml" />
|
||||
<include name="${HXCPP}/src/hx/libs/ssl/Build.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}/build-tool/BuildCommon.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
<include name="${HXCPP}/src/hx/libs/ssl/Build.xml" unless="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
|
||||
<target id="default" output="libmbedtls_hxcpp${DBG}" tool="linker" toolid="static_link">
|
||||
|
||||
<files id="hxcpp_ssl" />
|
||||
<files id="mbedtls" if="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
<files id="hxcpp_ssl" unless="HAS_HXCPP_MBEDTLS_FILES" />
|
||||
|
||||
</target>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user