2024-08-29 11:12:14 +08:00
|
|
|
cmake_minimum_required(VERSION 3.29)
|
2024-05-17 10:36:23 +08:00
|
|
|
|
2024-09-11 15:45:19 +08:00
|
|
|
project(SmartLockerTools VERSION 0.2 LANGUAGES C CXX)
|
2024-05-17 10:36:23 +08:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
2024-09-03 23:30:45 +08:00
|
|
|
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()
|
2024-05-17 10:36:23 +08:00
|
|
|
|
|
|
|
option(Boost_USE_STATIC_LIBS OFF)
|
2024-09-03 23:30:45 +08:00
|
|
|
|
2024-09-04 19:23:34 +08:00
|
|
|
set(OpenSSL_ROOT D:/Qt/Tools/OpenSSLv3/Win_x64)
|
|
|
|
set(OPENSSL_INCLUDE_DIR ${OpenSSL_ROOT}/include)
|
|
|
|
set(OpenSSL_LIBRARY_DIRS ${OpenSSL_ROOT}/lib)
|
|
|
|
set(OpenSSL_LIBRARIES libssl libcrypto)
|
2024-05-17 10:36:23 +08:00
|
|
|
|
2024-10-01 23:01:52 +08:00
|
|
|
set(FFmpeg_ROOT ${Libraries_ROOT}/ffmpeg-7.0.2-full_build-shared)
|
2024-06-13 15:41:40 +08:00
|
|
|
set(FFmpeg_INCLUDE_DIR ${FFmpeg_ROOT}/include)
|
|
|
|
set(FFmpeg_LIB_DIR ${FFmpeg_ROOT}/lib)
|
|
|
|
|
2024-06-21 11:33:11 +08:00
|
|
|
execute_process(
|
|
|
|
COMMAND D:/msys64/usr/bin/git rev-parse --short HEAD
|
|
|
|
OUTPUT_VARIABLE GIT_COMMIT_ID
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
|
2024-09-03 23:30:45 +08:00
|
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(Kylin
|
|
|
|
GIT_REPOSITORY https://gitea.amass.fun/amass/Kylin.git
|
|
|
|
)
|
2024-09-04 19:23:34 +08:00
|
|
|
set(KYLIN_WITH_FLUENT ON)
|
2024-09-03 23:30:45 +08:00
|
|
|
FetchContent_MakeAvailable(Kylin)
|
2024-05-17 10:36:23 +08:00
|
|
|
|
2024-05-23 19:58:36 +08:00
|
|
|
add_subdirectory(Peripheral)
|
2024-05-22 20:17:07 +08:00
|
|
|
add_subdirectory(Database)
|
2024-05-21 21:09:55 +08:00
|
|
|
add_subdirectory(Analyser)
|
2024-09-03 23:30:45 +08:00
|
|
|
if(WIN32)
|
|
|
|
add_subdirectory(OtaUpdate)
|
|
|
|
endif()
|