PassengerStatistics/CMakeLists.txt
2024-03-12 14:46:37 +08:00

33 lines
900 B
CMake

cmake_minimum_required(VERSION 3.16)
project(PassengerStatistics)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
option(CROSS_BUILD "build for embeded product." ON)
if(CROSS_BUILD)
set(Libraries_ROOT /opt/aarch64-v01c01-linux-gnu-gcc/lib)
set(OPENSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/openssl)
set(OPENSSL_LIBRARY_DIRS ${OPENSSL_ROOT_DIR}/libs)
else()
set(Libraries_ROOT /opt/Libraries)
endif()
set(OPENSSL_INCLUDE_DIR ${OPENSSL_ROOT_DIR}/include)
set(OPENSSL_LIBRARIES ssl crypto)
set(BOOST_ROOT ${Libraries_ROOT}/boost_1_84_0)
set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include)
option(Boost_USE_STATIC_LIBS OFF)
find_package(Boost REQUIRED COMPONENTS log serialization)
add_subdirectory(Main)
add_subdirectory(Tools)
include(FetchContent)
FetchContent_Declare(Kylin
GIT_REPOSITORY https://gitea.amass.fun/amass/Kylin.git
)
FetchContent_MakeAvailable(Kylin)