Commit 75c5f2a0 authored by Donatien Garnier's avatar Donatien Garnier
Browse files

v0.1 release

parents
# macOS
.DS_Store
# Generated files are here
gen
# Dependencies
dependencies/build
dependencies/platform
dependencies/libq
dependencies/gtest
dependencies/protobuf
dependencies/*.tar.gz
dependencies/boost/
dependencies/boost_1_66_0.tar.bz2
dependencies/djinni/
dependencies/song2-dependencies-0.0.1.tar.bz2
# Node modules
node_modules
# Visual studio code
.vscode
# PyCharm
.idea
# Doxygen
dox
#### XCode
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM
platform/android/song2/song2\.iml
FROM ubuntu:18.04
COPY . /app
RUN apt-get update && apt-get install -y \
build-essential \
openjdk-8-jre-headless \
libtool \
libboost-dev \
libboost-system-dev \
libboost-filesystem-dev \
npm \
gcc \
automake \
autoconf \
autogen \
cmake \
automake \
node-typescript \
scala \
libjavascriptcoregtk-4.0-dev \
curl \
git
RUN cd /app/dependencies && ./build_all_dependencies.sh
RUN cd /app && ./make_autogenerated.sh
RUN cd /app/test && rm -f CMakeCache.txt && cmake . && make
CMD cd /app/test && ./testapp
This diff is collapsed.
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
\ No newline at end of file
# IoT Companion Framework
This repository contains experimental software to allow communication with IoT devices on local communication interfaces (Bluetooth LE, USB, NFC) using a RPC framework.
The RPC framework is based on protocol buffers, and a Python code-generator helps generating client and server-side code.
## Licenses
### Outbound
The content of this repository is made available under the [Apache 2 License](LICENSE.txt) (SPDX: Apache-2.0).
### Inbound
This project is provided for reference and is therefore not accepting contributions at this stage.
### Third-party code
The following third-party software is used under their respective licenses:
* [Boost](https://www.boost.org/): [Boost Software License](https://www.boost.org/users/license.html)
* [Djinni](https://github.com/dropbox/djinni): [Apache 2 License](https://github.com/dropbox/djinni/blob/master/LICENSE)
* [Google Protocol Buffers](https://developers.google.com/protocol-buffers): [BSD 3-Clause](https://github.com/protocolbuffers/protobuf/blob/master/LICENSE)
* [Google Test](https://github.com/google/googletest): [BSD 3-Clause](https://github.com/google/googletest/blob/master/LICENSE)
* [NanoPb](https://github.com/nanopb/nanopb): [Zlib License](https://github.com/nanopb/nanopb/blob/master/LICENSE.txt)
* [Mbed OS](https://github.com/ARMmbed/mbed-os): [Apache 2 License](https://github.com/ARMmbed/mbed-os/blob/master/LICENSE-apache-2.0.txt)
## Supported platforms
Devices:
* Mbed OS
Host:
* macOS
* iOS
* Android (WIP)
* Linux (WIP)
Transports:
* BLE
* USB (WIP)
* NFC (WIP)
## Setting up
* Retrieve and build all dependencies from the `dependencies/` folder using the provided scripts:
* `get_boost.sh`, `clone_gtest.sh` and `get_protobuf.sh`
* `build_all_dependencies.sh` (or invoke individual scripts)
* Install the code generator from the `tools/generator` directory: `python3 setup.py install`
* Generate Djinni bindings: `generate-djinni-bindings.sh`
* Generate Protobuf files: `generate-protobuf-cpp.sh`
## Running the example
macOS is the easiest platform to get the example running.
* Build the Mbed OS example in `examples/simple`
* Build and run the `simple-example-macos` target in the XCode project in `platform/darwin/Song2.xcodeproj`
The example shows how to execute a RPC command on a Bluetooth device:
* The device-specific code is in `examples/simple/device`
* The client-specific code is in `examples/simple/client`
* Generated code is in `examples/simple/generated`
* The Protocol Buffer/RPC IDL file is in `examples/simple/dummy_service.proto`
### Client example - call a method on the device
The Client C++ code uses asynchronous promises to execute operations. Command parameters and responses are serialized using JSON.
```cpp
// Say hello!
arpc->call_method_json("arm.song2.test.Dummy", "SayHello", json_t("{a_string: \"everyone\"}"))
->then([&](std::future<json_t>& fut)
{
auto response = fut.get();
// Do something with response
}, queue);
```
## Generator
Install the generator using: `python3 setup.py install`
RPC interfaces can be written using the [protocol buffers IDL](https://developers.google.com/protocol-buffers/docs/proto#services).
The proto2 syntax needs to be used as the proto3 syntax is no supported at this moment.
For instance:
```
syntax = "proto2";
package arm.song2.test;
message IntegerMessage {
required int32 an_int = 1;
}
message StringMessage {
required string a_string = 1;
}
message EmtpyMessage {}
service Dummy {
rpc SetInteger(IntegerMessage) returns (EmtpyMessage) {}
rpc GetInteger(EmtpyMessage) returns (IntegerMessage) {}
rpc GetString(EmtpyMessage) returns (StringMessage) {}
rpc SetString(StringMessage) returns (EmtpyMessage) {}
rpc SayHello(StringMessage) returns (EmtpyMessage) {}
}
```
[nanopb](https://github.com/nanopb/nanopb) is used under the hood so a matching `.options` file can be used side by side.
You can then use the generator to create the device-side interfaces:
```bash
arpc-codegen dummy_service.proto
```
This will output C and C++ code thant contains virtual classes that can be implemented to handle RPC methods. An intermediary `blob.pb` file is also created - this can be consumed by the client code to convert JSON data to protocol buffer data and vice-versa.
## Open items
* Implementation of Protocol Buffers' RpcChannel and RpcController classes on supported platforms to leverage protoc generator on the client side
* Easier-to-use E2E examples and documentation
* USB support
\ No newline at end of file
#
# Be sure to run `pod spec lint Song2.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#
Pod::Spec.new do |s|
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#
s.name = "Song2"
s.version = "0.0.2"
s.summary = "The mbed commissioning SDK"
# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
The mbed commissioning SDK
DESC
s.homepage = "https://github.com/ARMmbed/mbed-song2"
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#
s.license = "Proprietary"
# s.license = { :type => "MIT", :file => "FILE_LICENSE" }
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#
s.authors = { "Donatien Garnier" => "donatien.garnier@arm.com" }
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#
# When using multiple platforms
s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.13"
s.prepare_command= <<-CMD
echo Extracting dependencies
if [ ! -d dependencies/platform ]; then
# Extract archive
tar -xzf ~/.song2-cache/song2-dependencies-0.0.1.tar.bz2 -C dependencies || exit 1
fi
echo Setup Djinni
export DJINNI_PATH=`pwd`/dependencies/djinni
echo Setup protoc compiler to use
export PROTOC=`pwd`/dependencies/platform/macos/bin/protoc
echo Generating Djinni bindings
./generate-djinni-bindings.sh
echo Generating Protobuf code
./generate-protobuf-cpp.sh
CMD
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#
s.source = { :git => "git@github.com:ARMmbed/mbed-song2.git", :tag => "#{s.version}", :submodules => true }
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#
s.source_files = "core/**/*{.h,.c}", "cpp/**/*{.hpp,.cpp}", "platform/darwin/threading/*{.h,.m}", "platform/darwin/transport/**/*{.h,.m}", "platform/darwin/S2DarwinFactory{.h,.m}",
"gen/djinni/cpp/**/*{.hpp,.cpp}", "gen/djinni/objc/**/*{.h,.m,.mm}", "gen/djinni/lib/*.hpp", "gen/djinni/lib/objc/*{.h,.mm}", "gen/proto/cpp/*{.h,.cc}",
"platform/darwin/song2-sdk/Song2.h", "platform/darwin/S2DarwinFactory.h", "gen/djinni/objc/S2JsApp.h", "gen/djinni/objc/S2Daemon.h",
"gen/djinni/objc/S2PlatformFactory.h", "gen/djinni/objc/S2PlatformBundle.h", "gen/djinni/objc/S2PlatfromHelper.h", "gen/djinni/objc/S2Queue.h",
"gen/djinni/objc/S2Dispatcher.h", "gen/djinni/objc/S2DispatcherStatus.h", "gen/djinni/objc/S2FoundationDispatcher.h",
"test/cpp/external/**/*{.h,.c}", "test/cpp/dummy_device/**/*{.h,.c,.hpp,.cpp}", "cpp/3rdparty/**/*{.h,.c}"
# TODO these should probably not be there in the first place
s.exclude_files = "gen/djinni/objc/S2App+Private.mm", "gen/djinni/objc/S2Daemon+Private.mm",
"cpp/api/**", "cpp/daemon/**", "cpp/service/**", "cpp/tools/**", "cpp/jsapi/Ble.cpp"
s.public_header_files = "platform/darwin/song2-sdk/Song2.h", "platform/darwin/S2DarwinFactory.h", "platform/darwin/threading/S2FoundationDispatcher.h", "gen/djinni/objc/S2JsApp.h", "gen/djinni/objc/S2Dameon.h",
"gen/djinni/objc/S2PlatformFactory.h", "gen/djinni/objc/S2PlatformBundle.h", "gen/djinni/objc/S2PlatfromHelper.h", "gen/djinni/objc/S2Queue.h",
"gen/djinni/objc/S2Dispatcher.h", "gen/djinni/objc/S2DispatcherStatus.h", "gen/djinni/objc/S2FoundationDispatcher.h", "gen/djinni/objc/S2Daemon.h"
s.pod_target_xcconfig= { 'HEADER_SEARCH_PATHS' => "${PODS_TARGET_SRCROOT} ${PODS_TARGET_SRCROOT}/core/srtp ${PODS_TARGET_SRCROOT}/core/arpc ${PODS_TARGET_SRCROOT}/core/acore ${PODS_TARGET_SRCROOT}/test/cpp/external" }
# https://stackoverflow.com/questions/19481125/add-static-library-to-podspec/19609714#19609714
s.subspec 'Protobuf' do |protobuf|
protobuf.libraries = 'protobuf', 'protobuf-lite', 'protoc'
protobuf.ios.preserve_paths = 'dependencies/platform/ios/include/google/protobuf/**/*.h'
protobuf.ios.vendored_libraries = 'dependencies/platform/ios/lib/libprotobuf.a', 'dependencies/platform/ios/lib/libprotobuf-lite.a', 'dependencies/platform/ios/lib/libprotoc.a'
protobuf.ios.pod_target_xcconfig= { 'HEADER_SEARCH_PATHS' => "${PODS_TARGET_SRCROOT}/dependencies/platform/ios/include" }
protobuf.macos.preserve_paths = 'dependencies/platform/macos/include/google/protobuf/**/*.h'
protobuf.macos.vendored_libraries = 'dependencies/platform/macos/lib/libprotobuf.a', 'dependencies/platform/macos/lib/libprotobuf-lite.a', 'dependencies/platform/macos/lib/libprotoc.a'
protobuf.macos.pod_target_xcconfig= { 'HEADER_SEARCH_PATHS' => "${PODS_TARGET_SRCROOT}/dependencies/platform/macos/include" }
end
s.subspec 'Boost' do |boost|
boost.preserve_paths = 'dependencies/boost/boost_1_66_0/boost/**/*{.h,.hpp}'
boost.pod_target_xcconfig= { 'HEADER_SEARCH_PATHS' => "${PODS_TARGET_SRCROOT}/dependencies/boost/boost_1_66_0" }
end
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#
# s.resource = "icon.png"
# s.resources = "Resources/*.png"
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#
s.frameworks = "CoreBluetooth", "JavascriptCore", "Foundation"
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.
# s.requires_arc = true
# s.pod_target_xcconfig= { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
end
# Copyright (C) 2018 ARM Limited. All rights reserved.
cmake_minimum_required(VERSION 3.5)
# check that we are actually running on OSX, if we're not then we may pull in
# incorrect dependencies.
if(NOT (${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin"))
message(FATAL_ERROR "This iOS target will not work on non-OS X platforms, use `yotta target` to set the target.")
endif()
# search path for included .cmake files (set this as early as possible, so that
# indirect includes still use it)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}/../../CMake")
### From: http://stackoverflow.com/questions/14171740/cmake-with-ios-toolchain-cant-find-threads
# set(MACOSX_BUNDLE_GUI_IDENTIFIER com.example)
# set(CMAKE_MACOSX_BUNDLE YES)
# set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "iPhone Developer")
set(CMAKE_MACOSX_BUNDLE ON)
set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED OFF)
######
# From: https://github.com/cristeab/ios-cmake/commit/2d81fea87b5fe681706e7fbd4f55f94c5b3d0904
# Some DG tweaks (FORCE_COMPILER macros deprecated and try_compile fix)
# Copyright (c) 2016, Bogdan Cristea <cristeab@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# This file is based off of the Platform/Darwin.cmake and Platform/UnixPaths.cmake
# files which are included with CMake 2.8.4
# It has been altered for iOS development
# Options:
#
# IOS_PLATFORM = OS (default) or SIMULATOR or SIMULATOR64
# This decides if SDKS will be selected from the iPhoneOS.platform or iPhoneSimulator.platform folders
# OS - the default, used to build for iPhone and iPad physical devices, which have an arm arch.