/[zanavi_public1]/navit/Toolchain/arm-eabi.cmake
ZANavi

Contents of /navit/Toolchain/arm-eabi.cmake

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (hide annotations) (download)
Fri Oct 28 21:19:04 2011 UTC (8 years, 11 months ago) by zoff99
File size: 1284 byte(s)
import files
1 zoff99 2 set(CMAKE_SYSTEM_NAME GNU)
2    
3     set(ANDROID TRUE)
4     set(ANDROID_API_VERSION 8 CACHE STRING "Andriod API Version")
5    
6     find_program(CMAKE_C_COMPILER arm-eabi-gcc arm-eabi-gcc.exe)
7     find_program(CMAKE_CXX_COMPILER arm-eabi-gcc arm-eabi-g++.exe)
8     set(PKG_CONFIG_EXECUTABLE "arm-eabi-pkg-config")
9    
10     get_filename_component(COMPILER_PATH ${CMAKE_C_COMPILER} PATH)
11    
12     set(ANDROID_NDK "${COMPILER_PATH}/../../../../.." CACHE STRING "PATH to Andriod NDK")
13    
14     set(NDK_ARCH_DIR "${ANDROID_NDK}/platforms/android-${ANDROID_API_VERSION}/arch-arm")
15     set(CMAKE_FIND_ROOT_PATH ${NDK_ARCH_DIR})
16    
17     set(CMAKE_REQUIRED_FLAGS "-nostdlib -lc -ldl -lgcc -L${NDK_ARCH_DIR}/usr/lib")
18     set(CMAKE_REQUIRED_INCLUDES "${NDK_ARCH_DIR}/usr/include")
19    
20     set (NAVIT_COMPILE_FLAGS "-I${NDK_ARCH_DIR}/usr/include -g -D_GNU_SOURCE -DANDROID ${CMAKE_REQUIRED_FLAGS}")
21    
22     set(CMAKE_SHARED_LINKER_FLAGS_INIT "${CMAKE_REQUIRED_FLAGS} -Wl,--no-undefined -Wl,-rpath,/system/lib")
23     set(CMAKE_EXE_LINKER_FLAGS_INIT "${CMAKE_REQUIRED_FLAGS} -Wl,--no-undefined")
24     set(CMAKE_MODULE_LINKER_FLAGS_INIT "${CMAKE_REQUIRED_FLAGS} -Wl,-rpath,/data/data/org/navitproject/navit/lib")
25    
26     set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
27     set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
28     set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
29     set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
30    
31    

   
Visit the ZANavi Wiki