SmartLockerTools/CMakeLists.txt
amass 1c92079320
Some checks failed
Build Applications / PullDocker (push) Successful in 3s
Build Applications / Build (push) Successful in 2m14s
Deploy Release / Build (push) Successful in 2m16s
Windows CI / build (push) Successful in 4m41s
Release tag / build (push) Failing after 11s
fix ci upload file.
2024-11-06 00:36:33 +08:00

68 lines
2.1 KiB
CMake

cmake_minimum_required(VERSION 3.28)
project(SmartLockerTools VERSION 0.4 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
if(WIN32)
set(Libraries_ROOT E:/Projects/Libraries CACHE STRING "Libraries directory.")
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
)
if(CMAKE_BUILD_TYPE STREQUAL "Release")
set(MBEDTLS_ROOT ${Libraries_ROOT}/mbedtls-3.6.2_msvc2022_64bit_release)
else()
set(MBEDTLS_ROOT ${Libraries_ROOT}/mbedtls-3.6.2_msvc2022_64bit_debug)
endif()
add_compile_options(/showIncludes-)
else()
execute_process(
COMMAND sh -c "echo $HOME"
OUTPUT_VARIABLE USER_HOME
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(Libraries_ROOT /opt/Libraries)
set(BOOST_ROOT ${Libraries_ROOT}/boost_1_86_0)
set(Boost_INCLUDE_DIR ${BOOST_ROOT}/include)
set(MBEDTLS_ROOT ${Libraries_ROOT}/mbedtls-3.6.2)
endif()
option(Boost_USE_STATIC_LIBS OFF)
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)
set(FFmpeg_ROOT ${Libraries_ROOT}/ffmpeg-7.0.2-full_build-shared)
set(FFmpeg_INCLUDE_DIR ${FFmpeg_ROOT}/include)
set(FFmpeg_LIB_DIR ${FFmpeg_ROOT}/lib)
set(MBEDTLS_INCLUDE_DIR ${MBEDTLS_ROOT}/include)
set(MBEDTLS_LIBRARY_DIRS ${MBEDTLS_ROOT}/lib)
execute_process(
COMMAND D:/msys64/usr/bin/git rev-parse --short HEAD
OUTPUT_VARIABLE GIT_COMMIT_ID
OUTPUT_STRIP_TRAILING_WHITESPACE
)
include(CPack)
include(FetchContent)
FetchContent_Declare(Kylin
GIT_REPOSITORY https://amass.fun/gitea/amass/Kylin.git
)
set(KYLIN_WITH_FLUENT ON)
FetchContent_MakeAvailable(Kylin)
add_subdirectory(Peripheral)
add_subdirectory(Database)
add_subdirectory(Analyser)
add_subdirectory(OtaUpdate)
add_subdirectory(UnitTest)
install(DIRECTORY ${CMAKE_BINARY_DIR}/lib DESTINATION .)