-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmips_toolchain.cmake
52 lines (43 loc) · 1.71 KB
/
mips_toolchain.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Define arm tool chain
MACRO (USE_MIPS_TOOLCHAIN)
MESSAGE("Use mips toolchain.")
# Define the dependency libraries root path.
if (ONYX_SDK_ROOT)
message("Onyx SDK Root path ${ONYX_SDK_ROOT}")
SET(CMAKE_FIND_ROOT_PATH ${ONYX_SDK_ROOT})
link_directories(${ONYX_SDK_ROOT}/lib)
link_directories(${ONYX_SDK_ROOT}/lib/adobe)
else (ONYX_SDK_ROOT)
message("Use default path: /opt/onyx/mips/")
SET(CMAKE_FIND_ROOT_PATH "/opt/onyx/mips/")
link_directories("/opt/onyx/mips/lib")
link_directories("/opt/onyx/mips/lib/adobe")
endif (ONYX_SDK_ROOT)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
if (${CMAKE_FIND_ROOT_PATH})
SET(CMAKE_INSTALL_PREFIX ${CMAKE_FIND_ROOT_PATH})
else (${CMAKE_FIND_ROOT_PATH})
SET(CMAKE_INSTALL_PREFIX "/opt/onyx/mips/")
endif (${CMAKE_FIND_ROOT_PATH})
# For libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
# Set up development build mode
SET(CMAKE_CXX_FLAGS "-s ")
SET(CMAKE_BUILD_TYPE Release CACHE STRING
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Devel."
FORCE)
SET(PDF_LIB libfpdfemb_arm.a)
SET(TTS_LIB AiSound4)
if (LINK_ZLIB_DEFAULT)
SET(ADD_LIB m rt pthread dl z)
else (LINK_ZLIB_DEFAULT)
set(ADD_LIB m rt pthread dl)
endif (LINK_ZLIB_DEFAULT)
ADD_DEFINITIONS(-DBUILD_FOR_ARM)
ADD_DEFINITIONS(-DENABLE_EINK_SCREEN)
ADD_DEFINITIONS(-DBS60_INIT_MAIN)
ADD_DEFINITIONS(-DBS80_INIT_MAIN)
ADD_DEFINITIONS(-DBS97_INIT_MAIN)
ADD_DEFINITIONS(-DSFM_M25P20)
ENDMACRO(USE_MIPS_TOOLCHAIN)