53 lines
1.4 KiB
CMake
53 lines
1.4 KiB
CMake
cmake_minimum_required(VERSION 3.29)
|
|
|
|
project(SmartLockerTools VERSION 0.1 LANGUAGES C CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
if(WIN32)
|
|
set(Projects_ROOT E:/Projects)
|
|
set(Libraries_ROOT ${Projects_ROOT}/Libraries)
|
|
set(BOOST_ROOT ${Libraries_ROOT}/boost_1_86_0_msvc2022_64bit)
|
|
set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include/boost-1_86)
|
|
add_compile_definitions(
|
|
BOOST_USE_WINAPI_VERSION=BOOST_WINAPI_VERSION_WIN10
|
|
)
|
|
else()
|
|
execute_process(
|
|
COMMAND sh -c "echo $HOME"
|
|
OUTPUT_VARIABLE USER_HOME
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
set(Projects_ROOT ${USER_HOME}/Projects)
|
|
set(Libraries_ROOT /opt/Libraries)
|
|
set(BOOST_ROOT ${Libraries_ROOT}/boost_1_86_0)
|
|
set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include)
|
|
endif()
|
|
|
|
option(Boost_USE_STATIC_LIBS OFF)
|
|
|
|
|
|
set(FFmpeg_ROOT ${Libraries_ROOT}/ffmpeg-7.0.1-full_build-shared)
|
|
set(FFmpeg_INCLUDE_DIR ${FFmpeg_ROOT}/include)
|
|
set(FFmpeg_LIB_DIR ${FFmpeg_ROOT}/lib)
|
|
|
|
execute_process(
|
|
COMMAND D:/msys64/usr/bin/git rev-parse --short HEAD
|
|
OUTPUT_VARIABLE GIT_COMMIT_ID
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
)
|
|
|
|
include(FetchContent)
|
|
FetchContent_Declare(Kylin
|
|
GIT_REPOSITORY https://gitea.amass.fun/amass/Kylin.git
|
|
)
|
|
FetchContent_MakeAvailable(Kylin)
|
|
|
|
add_subdirectory(Peripheral)
|
|
add_subdirectory(Database)
|
|
add_subdirectory(Analyser)
|
|
if(WIN32)
|
|
add_subdirectory(OtaUpdate)
|
|
endif()
|