aboutsummaryrefslogtreecommitdiff
path: root/docs/BUILD_CROSSCOMPILE.adoc
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-05-30 11:53:44 -0700
committerGarrett D'Amore <garrett@damore.org>2018-05-30 11:53:44 -0700
commitbcbb36cd4fee89ba86dc1028b9f4de928d361abe (patch)
treeb1c45912b99ef7586adbe27a764c582ed3311578 /docs/BUILD_CROSSCOMPILE.adoc
parentf01e2c82f236b405b95adbe517a3cc9b41d17f16 (diff)
downloadnng-bcbb36cd4fee89ba86dc1028b9f4de928d361abe.tar.gz
nng-bcbb36cd4fee89ba86dc1028b9f4de928d361abe.tar.bz2
nng-bcbb36cd4fee89ba86dc1028b9f4de928d361abe.zip
fixes #477 Android NDK build configuration
This enables the software to be built for Android, going back to at least Android SDK r15 (IceCreamSandwich) and at least up to SDK r27 (Oreo). Older versions of Android may work, but we have no way to build them to test. While here we have changed our CMake configuration to disable building tools or tests when we detect a cross-compile situation. Documentation for cross-compilation is updated as well.
Diffstat (limited to 'docs/BUILD_CROSSCOMPILE.adoc')
-rw-r--r--docs/BUILD_CROSSCOMPILE.adoc33
1 files changed, 33 insertions, 0 deletions
diff --git a/docs/BUILD_CROSSCOMPILE.adoc b/docs/BUILD_CROSSCOMPILE.adoc
new file mode 100644
index 00000000..8b57f812
--- /dev/null
+++ b/docs/BUILD_CROSSCOMPILE.adoc
@@ -0,0 +1,33 @@
+= Building for Cross Compilation
+
+TIP: Cross-compiling is used when the operating system or process architecure
+the software is being built for is different than the system where the software
+is being compiled. If you don't know what this means, this does not apply to
+and you should ignore this file.
+
+When building for cross-compilation, you can use CMake's native support
+`CMAKE_TOOLCHAIN_FILE` to configure the location of the toolchain.
+
+You'll need that toolchain to have your compiler, linker, header files,
+and possibly any other libraries that need to be linked at build time.
+
+This is all relatively standard stuff for CMake.
+
+A lot more detail is located here: https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/CrossCompiling
+
+NOTE: When _NNG_ detects that it is being built in a Cross-Compile
+situation (i.e. when `CMAKE_CROSSCOMPILING` is true), it will default
+to disabling the building of the test suite and tools.
+This is normally preferable, since many embedded environments cannot host
+command line applications or shell environments. +
+ +
+To enable tools or tests to build anyway, the values of either
+`NNG_TOOLS` or `NNG_TESTS` (or both) may be set to `ON`.
+
+== Cross-compiling for Android
+
+More details for Android are located in the <<BUILD_ANDROID.adoc>> file.
+
+== Cross-compiling for iOS
+
+More details for iOS (and tvOS, etc.) are located in the <<BUILD_IOS.adoc>> file.