merged
This commit is contained in:
@@ -28,28 +28,12 @@ IF(NOT RPI_ROOT)
|
||||
set(RPI_TOOLCHAIN ${RPI_ROOT}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin)
|
||||
ENDIF()
|
||||
|
||||
IF(CROSS_COMPILE)
|
||||
SET(CMAKE_CROSSCOMPILING TRUE)
|
||||
#SET(CMAKE_TOOLCHAIN_FILE ${RPI_ROOT}/Toolchain-RaspberryPi.cmake)
|
||||
SET(CMAKE_SYSTEM_NAME Linux)
|
||||
SET(CMAKE_SYSTEM_VERSION 1)
|
||||
|
||||
# Specify the cross compiler
|
||||
SET(CMAKE_C_COMPILER /usr/bin/clang)
|
||||
SET(CMAKE_CXX_COMPILER /usr/bin/clang)
|
||||
|
||||
# Where is the target environment
|
||||
SET(CMAKE_FIND_ROOT_PATH ${RPI_ROOT}/rootfs)
|
||||
# SET(CMAKE_FIND_ROOT_PATH $ENV{HOME}/raspberrypi/rootfs)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
ENDIF(CROSS_COMPILE)
|
||||
|
||||
###################### START_CMAKE #######################
|
||||
cmake_minimum_required(VERSION 3.0.1)
|
||||
project(FlippR-Driver VERSION 0.1.0)# LANGUAGES CXX)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
#set easylogging flags
|
||||
add_definitions(-DELPP_NO_DEFAULT_LOG_FILE)
|
||||
|
||||
@@ -102,7 +86,10 @@ endif(Boost_FOUND)
|
||||
##################### WIRING_PI ##########################
|
||||
find_library(wiringPi_LIB wiringPi)
|
||||
if(NOT wiringPi_LIB)
|
||||
message(FATAL_ERROR "Could not find wiringPi library")
|
||||
message(WARNING "Could not find wiringPi library, used testing wiring pi lib instead.")
|
||||
add_definitions(-DNO_WIRING_PI)
|
||||
else()
|
||||
message (STATUS "Found wiring pi.")
|
||||
endif()
|
||||
target_link_libraries(${PROJECT_NAME} PUBLIC ${wiringPi_LIB})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user