aboutsummaryrefslogtreecommitdiff
path: root/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
parent107cd3d8c15e0d2a35094d38504fc6aecfaa9058 (diff)
downloadsherlock.lv2-645a594ed4409178b8522a8ef2e430ab103f857a.tar.xz
add cmake cross build script.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/arm-linux-gnueabihf.cmake22
-rw-r--r--cmake/i686-linux-gnu.cmake11
-rw-r--r--cmake/i686-w64-mingw32.cmake25
-rw-r--r--cmake/universal-apple-darwin.cmake24
-rw-r--r--cmake/x86_64-linux-gnu.cmake8
-rw-r--r--cmake/x86_64-w64-mingw32.cmake25
6 files changed, 115 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")
diff --git a/cmake/i686-linux-gnu.cmake b/cmake/i686-linux-gnu.cmake
new file mode 100644
index 0000000..f00ae3e
--- /dev/null
+++ b/cmake/i686-linux-gnu.cmake
@@ -0,0 +1,11 @@
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR "i686")
+set(TOOLCHAIN "i686-linux-gnu")
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
+
+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")
diff --git a/cmake/i686-w64-mingw32.cmake b/cmake/i686-w64-mingw32.cmake
new file mode 100644
index 0000000..3564cad
--- /dev/null
+++ b/cmake/i686-w64-mingw32.cmake
@@ -0,0 +1,25 @@
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_PROCESSOR "i686")
+set(TOOLCHAIN "i686-w64-mingw32")
+
+# which compilers to use for C and C++
+set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc")
+set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++")
+set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres")
+
+# 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")
+
+set(WINE wine32)
diff --git a/cmake/universal-apple-darwin.cmake b/cmake/universal-apple-darwin.cmake
new file mode 100644
index 0000000..51079cb
--- /dev/null
+++ b/cmake/universal-apple-darwin.cmake
@@ -0,0 +1,24 @@
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Darwin)
+set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+set(TOOLCHAIN "universal-apple-darwin")
+
+set(CMAKE_OSX_ARCHITECTURES "x86_64;i386")
+
+# which compilers to use for C and C++
+set(CMAKE_C_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang")
+set(CMAKE_CXX_COMPILER "/usr/${TOOLCHAIN}/bin/x86_64-apple-darwin15-clang++")
+
+# 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")
diff --git a/cmake/x86_64-linux-gnu.cmake b/cmake/x86_64-linux-gnu.cmake
new file mode 100644
index 0000000..730a594
--- /dev/null
+++ b/cmake/x86_64-linux-gnu.cmake
@@ -0,0 +1,8 @@
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Linux)
+set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+set(TOOLCHAIN "x86_64-linux-gnu")
+
+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")
diff --git a/cmake/x86_64-w64-mingw32.cmake b/cmake/x86_64-w64-mingw32.cmake
new file mode 100644
index 0000000..9e90894
--- /dev/null
+++ b/cmake/x86_64-w64-mingw32.cmake
@@ -0,0 +1,25 @@
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Windows)
+set(CMAKE_SYSTEM_PROCESSOR "x86_64")
+set(TOOLCHAIN "x86_64-w64-mingw32")
+
+# which compilers to use for C and C++
+set(CMAKE_C_COMPILER "${TOOLCHAIN}-gcc")
+set(CMAKE_CXX_COMPILER "${TOOLCHAIN}-g++")
+set(CMAKE_RC_COMPILER "${TOOLCHAIN}-windres")
+
+# 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")
+
+set(WINE wine64)