Better fix for rebuild iOS and build iOS project

This commit is contained in:
Josh Tynjala
2020-06-15 14:23:26 -07:00
parent 60bdf42046
commit 8701624f0a
2 changed files with 12 additions and 2 deletions

View File

@@ -278,10 +278,9 @@
<section if="LIME_ZLIB">
<compilerflag value="-DSTATIC_LINK" if="emscripten" />
<compilerflag value="-DSTATIC_LINK" if="emscripten || ios || tvos" />
<compilerflag value="-DLIME_ZLIB" />
<file name="${HXCPP}/project/libs/zlib/ZLib.cpp" if="emscripten || ios || static_link || tvos" />
<file name="src/utils/compress/Zlib.cpp" />
</section>

View File

@@ -2,6 +2,17 @@
#include <zlib.h>
#ifdef STATIC_LINK
extern "C" int zlib_register_prims()
{
static bool init = false;
if (init) return 0;
init = true;
return 0;
}
#endif
namespace lime {