Code Monkey home page Code Monkey logo

myhololens / gameplay-deps Goto Github PK

View Code? Open in Web Editor NEW

This project forked from gameplay3d/gameplay-deps

0.0 2.0 0.0 144.29 MB

External dependencies for GamePlay framework.

Home Page: http://www.gameplay3d.io

CMake 0.96% C++ 27.89% Makefile 5.48% Lua 0.02% C 48.20% RPC 2.72% HLSL 0.09% JavaScript 0.05% Batchfile 0.03% Python 0.35% HTML 5.39% GLSL 0.01% Objective-C 0.68% Rich Text Format 0.01% Objective-C++ 0.01% Cuda 0.17% Shell 3.11% M4 1.36% TeX 1.31% Roff 2.16%

gameplay-deps's Introduction

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

gameplay-deps's People

Contributors

nlandry avatar seanpaultaylor avatar rgngl avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.