代码拉取完成,页面将自动刷新
同步操作将从 智路理事会/airos-vehicle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
CMAKE_MINIMUM_REQUIRED(VERSION 3.16)
PROJECT(airos-vehicle)
SET(CMAKE_C_STANDARD 11)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_C_FLAGS "-fPIC -g -DPIC -Werror=return-type -DNDEBUG -DDCHECK_ALWAYS_ON=0")
SET(CMAKE_CXX_FLAGS "-fPIC -g -DPIC -Werror=return-type -DNDEBUG -DDCHECK_ALWAYS_ON=0")
### option
OPTION(LOAD_SERVICE_FROM_LIB "load service from airos-vehicle/service" ON)
OPTION(USE_FAKE_OBU "load fake obu service" ON)
OPTION(USE_SCENE_SERVICE "load scene service" ON)
OPTION(USE_PC5_SERVICE "load pc5 service" ON)
IF (LOAD_SERVICE_FROM_LIB)
add_definitions(-DLOAD_SERVICE_FROM_LIB)
ENDIF()
IF (USE_FAKE_OBU)
add_definitions(-DUSE_FAKE_OBU)
ENDIF()
IF (USE_SCENE_SERVICE)
add_definitions(-DUSE_SCENE_SERVICE)
ENDIF()
IF (USE_PC5_SERVICE)
add_definitions(-DUSE_PC5_SERVICE)
ENDIF()
### output path
SET(FRAMEWORK_OUTPUT_ROOT "${CMAKE_BINARY_DIR}/output")
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${FRAMEWORK_OUTPUT_ROOT}/lib)
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${FRAMEWORK_OUTPUT_ROOT}/lib)
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${FRAMEWORK_OUTPUT_ROOT}/bin)
### install path
SET(CMAKE_INSTALL_PREFIX "$ENV{HOME}/${CMAKE_PROJECT_NAME}")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
SET(FRAMEWORK_TEST_DIR "${CMAKE_INSTALL_PREFIX}/test/")
SET(FRAMEWORK_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin/")
SET(FRAMEWORK_INC_DIR "${CMAKE_INSTALL_PREFIX}/include/")
SET(FRAMEWORK_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib/")
SET(FRAMEWORK_LOG_DIR "${CMAKE_INSTALL_PREFIX}/log/")
SET(FRAMEWORK_SERVICE_DIR "${CMAKE_INSTALL_PREFIX}/service/")
SET(FRAMEWORK_CONF_DIR "${CMAKE_INSTALL_PREFIX}/conf/")
### deps libs
SET(CMAKE_FIND_PACKAGE_PREFER_CONFIG TRUE)
FIND_PACKAGE(Boost REQUIRED COMPONENTS system)
FIND_PACKAGE(Threads REQUIRED)
FIND_PACKAGE(jsoncpp REQUIRED)
FIND_PACKAGE(gflags REQUIRED)
FIND_PACKAGE(glog REQUIRED)
FIND_PACKAGE(GTest REQUIRED)
FIND_PACKAGE(websocketpp REQUIRED)
FIND_PACKAGE(protobuf REQUIRED)
IF ("${CMAKE_SYSTEM_NAME}" STREQUAL "Android")
## FIT for cross compile
SET_TARGET_PROPERTIES(protobuf::protoc PROPERTIES
IMPORTED_LOCATION_RELEASE
/usr/local/bin/protoc
)
ELSE ()
LINK_LIBRARIES(pthread rt)
ENDIF ()
LINK_LIBRARIES(
uuid
jsoncpp_lib
glog::glog
gflags
protobuf::libprotobuf
Boost::system
ssl crypto
dl m
-Wl,-z,defs
)
### include dir
INCLUDE_DIRECTORIES(src)
### sub directory
ADD_SUBDIRECTORY(src)
### install file/dir
INSTALL(DIRECTORY DESTINATION ${FRAMEWORK_LOG_DIR})
INSTALL(DIRECTORY DESTINATION ${FRAMEWORK_SERVICE_DIR})
INSTALL(DIRECTORY conf DESTINATION ${CMAKE_INSTALL_PREFIX})
INSTALL(DIRECTORY templates DESTINATION ${CMAKE_INSTALL_PREFIX})
INSTALL(DIRECTORY tools DESTINATION ${CMAKE_INSTALL_PREFIX})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。