Просмотр исходного кода

Added support for cross compiling on STxP70 platforms.

Ioannis Koutras лет назад: 13
Родитель
Сommit
aeb421c8e4
1 измененных файлов с 19 добавлено и 0 удалено
  1. 19 0
      toolchain-stxp70.cmake

+ 19 - 0
toolchain-stxp70.cmake

@@ -0,0 +1,19 @@
+include(CMakeForceCompiler)
+
+SET(CMAKE_SYSTEM_NAME STxP70)
+
+# The environment variables should be already set
+# in order to do proper cross compiling
+set (CMAKE_FORCE_C_COMPILER $ENV{CC})
+
+set (CMAKE_C_FLAGS $ENV{CFLAGS}) 
+set (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS $ENV{LDFLAGS})
+
+set (CMAKE_AR $ENV{AR})
+set (CMAKE_RANLIB $ENV{RANLIB})
+
+# search for programs in the build host directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+# for libraries and headers in the target directories
+SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)