The deps needed to build the gameplay framework/engine

#gamedev #game-engine #dependencies #3d #library #libs #gameplay

Sean Taylor 49ecf040ad Update GNU_C.h 9 yıl önce
base64-1.0.0 3fb1277fcc Added libbase64 11 yıl önce
bullet-2.82-r2704 7a3b9bb78f Don't have a "bullet/" include directory 11 yıl önce
cmake 9a246f56a7 Disable Box2D. Get Android working for r10e 10 yıl önce
curl-7.39.0 c8bd4a449c Modify cURL build targets 11 yıl önce
freetype-2.4.5 2bc3e1cce8 Add libfreetype 2.4.5 11 yıl önce
glew-1.10.0 be4e9c88fe Fix GLEW compile flags 11 yıl önce
libjson-7.6.1 49ecf040ad Update GNU_C.h 9 yıl önce
lua-5.2.3 c7ef6c2e81 Lua build changes 11 yıl önce
ogg-1.3.2 52d930a28b Fix Android cross-compiling issues 11 yıl önce
openal-1.16.0 01504acce8 Fixes for VS 2015 10 yıl önce
png-1.6.15 21c80cc8f8 Skip installing duplicate png headers 11 yıl önce
theora-1.1.1 66a9393f2f Use different Box2D version, add icu, theora 11 yıl önce
tinyxml2-2.1.0 52d930a28b Fix Android cross-compiling issues 11 yıl önce
vorbis-1.3.4 bf3aa01621 Updates to support Win64 11 yıl önce
zlib-1.2.8 5bd924126f Fix zconf.h on Windows 11 yıl önce
.gitattributes 52d930a28b Fix Android cross-compiling issues 11 yıl önce
.gitignore 3fb1277fcc Added libbase64 11 yıl önce
CMakeLists.txt 8e8d32f448 Removed sqlite and box2d 10 yıl önce
README.md 21821a161c Merge branch 'master' into next 10 yıl önce

README.md

GamePlay-deps

External dependencies for GamePlay 3D framework.

We are using CMake to create a single, consistent way of compiling all the libraries that GamePlay uses. CMake with toolchain files are used to support cross-compiling.

Host Target Platform Target Arch
MacOSX macosx x86_64
ios arm (armv7, armv7s, arm64 combined)
x86 (i386, x86_64 combined)
android armeabi-v7a
x86
Linux linux x86_64
android armeabi-v7a
x86
Windows windows x86_64

Compiling (Host and Target are the same)

Linux and MacOSX

For the simple case (not cross-compiling):

$ cd GamePlay-deps
$ mkdir build
$ cd build
$ cmake ..
$ make install

This will build all the libraries and place them into a new "out" directory with the following structure:

  • All public headers are copied to out/external-deps/include
  • Libraries are built in out/external-deps/lib/<target platform>/<target arch>

When building for multiple targets, only one of those targets requires a "make install". The install step will copy the public headers, which are the same regardless of the target. So it's only needed once.

Windows

For Windows, we generate Visual Studio project files. It should be done from within a Visual Studio 2015 x64 command prompt. You must also have the DirectX SDK installed because OpenAL should use the DirectSound back-end. We also build both the Debug and Release variants.

> cd GamePlay-deps
> mkdir build
> cd build
> cmake -G "Visual Studio 14 Win64" ..
> msbuild GamePlay-deps.sln /property:Configuration=Debug
> msbuild GamePlay-deps.sln /property:Configuration=Release

Cross-Compiling (Host and Target are different)

For cross-compiling we need a properly setup target SDK and we need to make use of either cmake/ios.toolchain.cmake or cmake/android.toolchain.cmake

iOS Setup

Install XCode 6

iOS Compiling

For arm architecture:

$ cd GamePlay-deps
$ mkdir build
$ cd build
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DIOS_PLATFORM=OS ..
$ make install

For x86 we change the IOS_PLATFORM flag:

$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake -DIOS_PLATFORM=SIMULATOR ..

Android Setup

Install the Android NDK r10e (available here: https://developer.android.com/tools/sdk/ndk/index.html). Once installed you'll need to setup a standalone toolchain directory for each of the architectures you want to build. To do that:

$ cd android-ndk-r10e
$ ./build/tools/make-standalone-toolchain.sh --platform=android-16 --arch=arm --install-dir=/path/to/android-toolchain-arm
$ ./build/tools/make-standalone-toolchain.sh --platform=android-16 --arch=x86 --install-dir=/path/to/android-toolchain-x86

This will install the standalone toolchain directories in /path/to/android-toolchain-arm (for armeabi-v7a) and /path/to/android-toolchain-x86 (for x86, usually simulator).

Android Compiling

With the standalone toolchain directories in place, we can run cmake using the android.toolchain.cmake. For this toolchain file we set the ANDROID_STANDALONE_TOOLCHAIN environment variable to the appropriate standalone toolchain directory. We do this prior to running cmake.

$ cd GamePlay-deps
$ mkdir build
$ cd build
$ export ANDROID_STANDALONE_TOOLCHAIN=/path/to/android-toolchain-arm
$ cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/android.toolchain.cmake ..
$ make

For building the simulator version (or any other arch) just change the environment variable:

$ export ANDROID_STANDALONE_TOOLCHAIN=/path/to/android-toolchain-x86