1#-------------------------------------------------------------------------
2# drawElements CMake utilities
3# ----------------------------
4#
5# Copyright 2016 The Android Open Source Project
6#
7# Licensed under the Apache License, Version 2.0 (the "License");
8# you may not use this file except in compliance with the License.
9# You may obtain a copy of the License at
10#
11#      http://www.apache.org/licenses/LICENSE-2.0
12#
13# Unless required by applicable law or agreed to in writing, software
14# distributed under the License is distributed on an "AS IS" BASIS,
15# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16# See the License for the specific language governing permissions and
17# limitations under the License.
18#
19#-------------------------------------------------------------------------
20
21# Platform defines.
22set(CMAKE_SYSTEM_NAME Linux)
23set(CMAKE_CROSSCOMPILING 1)
24set(DE_CPU "DE_CPU_ARM")
25
26# Toolchain/compiler base.
27set(CC_PATH			"/opt/raspi/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi"	CACHE STRING "Cross compiler path")
28set(CROSS_COMPILE	"${CC_PATH}/bin/arm-bcm2708hardfp-linux-gnueabi-"				CACHE STRING "Cross compiler prefix")
29set(SYSROOT_PATH	"${CC_PATH}/arm-bcm2708hardfp-linux-gnueabi/sysroot"			CACHE STRING "Raspbian sysroot path")
30
31set(CMAKE_C_COMPILER "${CROSS_COMPILE}gcc")
32set(CMAKE_CXX_COMPILER "${CROSS_COMPILE}g++")
33
34# Search libs and include files (but not programs) from toolchain dir.
35set(CMAKE_FIND_ROOT_PATH ${SYSROOT_PATH})
36set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
37set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
38set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
39
40set(TARGET_C_FLAGS	"")
41set(CMAKE_C_FLAGS	"${TARGET_C_FLAGS}" CACHE STRING "" FORCE)
42set(CMAKE_CXX_FLAGS	"${TARGET_C_FLAGS}" CACHE STRING "" FORCE)
43