aboutsummaryrefslogtreecommitdiff
path: root/cmake/arm-linux-gnueabihf.cmake
diff options
context:
space:
mode:
authorHanspeter Portner <dev@open-music-kontrollers.ch>2016-11-05 15:07:41 +0100
committerHanspeter Portner <dev@open-music-kontrollers.ch>2016-11-05 15:07:41 +0100
commit645a594ed4409178b8522a8ef2e430ab103f857a (patch)
treee7e1fc38dea4584025fbc24ee9ef215be6be6315 /cmake/arm-linux-gnueabihf.cmake
parent107cd3d8c15e0d2a35094d38504fc6aecfaa9058 (diff)
downloadsherlock.lv2-645a594ed4409178b8522a8ef2e430ab103f857a.tar.xz
add cmake cross build script.
Diffstat (limited to 'cmake/arm-linux-gnueabihf.cmake')
-rw-r--r--cmake/arm-linux-gnueabihf.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/cmake/arm-linux-gnueabihf.cmake b/cmake/arm-linux-gnueabihf.cmake
new file mode 100644
index 0000000..f6d0b2a
--- /dev/null
+++ b/cmake/arm-linux-gnueabihf.cmake
@@ -0,0 +1,22 @@
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR "armv7h")
+set(TOOLCHAIN "arm-linux-gnueabihf")
+
+# which compilers to use for C and C++
+set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc")
+set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++")
+
+# here is the target environment located
+set(CMAKE_FIND_ROOT_PATH "usr/${TOOLCHAIN}")
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
+
+set(STATIC_SRATOM "/opt/${TOOLCHAIN}/lib/libsratom-0.a")
+set(STATIC_SERD "/opt/${TOOLCHAIN}/lib/libserd-0.a")
+set(STATIC_SORD "/opt/${TOOLCHAIN}/lib/libsord-0.a")