1cmake_minimum_required(VERSION 3.13) 2 3project(agl_services CXX) 4 5set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib 6 CACHE PATH "Path of static libraries.") 7set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib 8 CACHE PATH "Path of dynamic libraries.") 9set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin 10 CACHE PATH "Path of executables.") 11mark_as_advanced(CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY CMAKE_ARCHIVE_OUTPUT_DIRECTORY) 12 13get_filename_component(trout_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR} ABSOLUTE) 14 15# ========== grpc build settings =================== 16set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl) 17set(CARES_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/cares) 18set(GFLAGS_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/gflags) 19set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf) 20set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib) 21 22 23if (CMAKE_CROSSCOMPILING) 24 # ========== vehicle hal server build settings =================== 25 set(trout_ANDROID_SYSCORE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/android/system_core) 26 set(trout_FMTLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/fmtlib) 27 set(trout_GRPC_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/grpc-grpc) 28 set(trout_JSONCPP_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/jsoncpp) 29 set(trout_NATIVE_VHAL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/default_native_vehicle_hal) 30 set(trout_PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf) 31 32 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/dumpstate_server/agl_build) 33 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/vehicle_hal_server/agl_build) 34 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/watchdog_test_server) 35 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/vehicle_hal_server/garage_mode_helper) 36 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/audiocontrol/agl_build) 37 38else() 39 # ========== grpc host tools =================== 40 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/grpc-grpc) 41endif() 42