HaxeFoundation / HaxeFoundation/hashlink

ThirdParty iOS Dependencies

Open
#144 34 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
901
Forks
201
Avg merge
18h 9m
Merged PRs (30d)
8

Description

I am working on building all third party dependencies for iOS, so might as well start this thread as I see one for android all ready open.

### Working
**libsdl2**: Official Distro has an Xcode project, that will generate libSDL2.a

**libpng**: Built from source in project w/ preprocessor macros
```
PNG_NO_CONFIG_H
PNG_ARM_NEON_OPT=0
HAVE_DLFCN_H=1
HAVE_INTTYPES_H=1
HAVE_LIBZ=1
HAVE_MEMORY_H=1
HAVE_MEMSET=1
HAVE_POW=1
HAVE_STDINT_H=1
HAVE_STDLIB_H=1
HAVE_STRINGS_H=1
HAVE_STRING_H=1
HAVE_SYS_STAT_H=1
HAVE_SYS_TYPES_H=1
HAVE_UNISTD_H=1
STDC_HEADERS=1
```

**pcre**: Included source in project

**libz**: Included in iPhoneSDK as libz.tbd

**libsqlite3**: Included in iPhoneSDK as libdqlite3.tbd

**libturbo-jpeg**: https://libjpeg-turbo.org/Documentation/OfficialBinaries
Installed dmg, then linked against the library that is installed in `/opt/libjpeg-turb/**`, the resulting dylib path is not relative to the application binary, so instead using this static version found here (https://github.com/hjeffrey/turbojpeg) BITCODE is not enabled though... ☹️

**Ogg**: https://github.com/iosdevzone/IDZPrecompiledOgg
**Vorbis**: https://github.com/iosdevzone/IDZPrecompiledVorbis
Link to the included Frameworks in these repositories

**OpenAL**: Link against the OpenAL.framework in the iphone SDK.
Ensure you pass `-L hlopenal` when generating your c source with hl
Patch EFX.hx to just provide empty stubs

### TODO
**libturbo-jpeg**: Need to find build a fat-binary with BITCODE enabled.

**mbedtls**: ???

**ffmpeg**: https://github.com/kewlbear/FFmpeg-iOS-build-script

### General Setup
- Use the Xcode Project Template included with SDL2 for iOS
- Add hashlink src and hashlink library source (*.hdll source) to project
- Add hl output src from my heaps project
- Add pcre source to project
- Edit System Header Search Paths to something like..
```
$SRCROOT/src
$SRCROOT/deps/hashlink/src
$SRCROOT/deps/hashlink/include/png
$SRCROOT/deps/hashlink/include/pcre
$SRCROOT/deps/SDL/include
$SRCROOT/deps/hashlink/libs/sdl
$SRCROOT/deps/hashlink/libs/openal
/opt/libjpeg-turbo/include
```

Once this is all wrangled setting up a CocoaPod that resolves all dependencies for hashlink could be pretty slick. Thoughts?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.