Backup.
This commit is contained in:
parent
1f364ab7f0
commit
e830334096
|
@ -164,7 +164,13 @@ endif()
|
||||||
|
|
||||||
# 添加编译目录
|
# 添加编译目录
|
||||||
add_subdirectory(external)
|
add_subdirectory(external)
|
||||||
add_subdirectory(application)
|
# 检查子目录 application 是否存在,存在再添加
|
||||||
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||||
|
message(STATUS "application exists, add application to project.")
|
||||||
|
add_subdirectory(application)
|
||||||
|
else()
|
||||||
|
message(STATUS "application not exists.")
|
||||||
|
endif()
|
||||||
add_subdirectory(middleware)
|
add_subdirectory(middleware)
|
||||||
add_subdirectory(utils)
|
add_subdirectory(utils)
|
||||||
add_subdirectory(hal)
|
add_subdirectory(hal)
|
||||||
|
@ -181,6 +187,12 @@ endif()
|
||||||
message("MAIN_INCLUDE_PATH = ${MAIN_INCLUDE_PATH}")
|
message("MAIN_INCLUDE_PATH = ${MAIN_INCLUDE_PATH}")
|
||||||
message("MAIN_SRC_FILE = ${MAIN_SRC_FILE}")
|
message("MAIN_SRC_FILE = ${MAIN_SRC_FILE}")
|
||||||
message("MAIN_LINK_LIB = ${MAIN_LINK_LIB}")
|
message("MAIN_LINK_LIB = ${MAIN_LINK_LIB}")
|
||||||
add_subdirectory(test)
|
# 检查子目录 test 是否存在,存在再添加
|
||||||
|
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/CMakeLists.txt")
|
||||||
|
message(STATUS "test exists, add test to project.")
|
||||||
|
add_subdirectory(test)
|
||||||
|
else()
|
||||||
|
message(STATUS "test not exists.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# include(build/global_config.cmake)
|
# include(build/global_config.cmake)
|
|
@ -14,6 +14,7 @@
|
||||||
*/
|
*/
|
||||||
#include "AppMonitor.h"
|
#include "AppMonitor.h"
|
||||||
#include "ILog.h"
|
#include "ILog.h"
|
||||||
|
#include <vector>
|
||||||
StatusCode AppMonitor::GetProductInfo(AppGetProductInfo ¶m)
|
StatusCode AppMonitor::GetProductInfo(AppGetProductInfo ¶m)
|
||||||
{
|
{
|
||||||
LogInfo("AppMonitor::GetProductInfo.\n");
|
LogInfo("AppMonitor::GetProductInfo.\n");
|
||||||
|
|
2
external/openssl/build_openssl.sh
vendored
2
external/openssl/build_openssl.sh
vendored
|
@ -2,7 +2,7 @@
|
||||||
#编译curl库
|
#编译curl库
|
||||||
platform=$1
|
platform=$1
|
||||||
CMAKE_SOURCE_DIR=$2
|
CMAKE_SOURCE_DIR=$2
|
||||||
echo "Compile curl, platform = $platform, cmake source dir = $CMAKE_SOURCE_DIR."
|
echo "Compile openssl, platform = $platform, cmake source dir = $CMAKE_SOURCE_DIR."
|
||||||
export ROOT_PATH=$PWD
|
export ROOT_PATH=$PWD
|
||||||
|
|
||||||
# if [ ! -d "./openssl-3.1.0" ];then
|
# if [ ! -d "./openssl-3.1.0" ];then
|
||||||
|
|
|
@ -5,3 +5,4 @@ add_subdirectory(McuManager)
|
||||||
add_subdirectory(McuAskBase)
|
add_subdirectory(McuAskBase)
|
||||||
add_subdirectory(MediaManager)
|
add_subdirectory(MediaManager)
|
||||||
add_subdirectory(AppManager)
|
add_subdirectory(AppManager)
|
||||||
|
add_subdirectory(StorageManager)
|
64
middleware/StorageManager/CMakeLists.txt
Normal file
64
middleware/StorageManager/CMakeLists.txt
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
|
||||||
|
include(${CMAKE_SOURCE_DIR_IPCSDK}/build/global_config.cmake)
|
||||||
|
set(EXECUTABLE_OUTPUT_PATH ${EXEC_OUTPUT_PATH})
|
||||||
|
set(LIBRARY_OUTPUT_PATH ${LIBS_OUTPUT_PATH})
|
||||||
|
|
||||||
|
include_directories(
|
||||||
|
./src
|
||||||
|
./include
|
||||||
|
${MIDDLEWARE_SOURCE_PATH}/McuAskBase/include
|
||||||
|
${UTILS_SOURCE_PATH}/StatusCode/include
|
||||||
|
${UTILS_SOURCE_PATH}/Log/include
|
||||||
|
${UTILS_SOURCE_PATH}/McuProtocol/include
|
||||||
|
${UTILS_SOURCE_PATH}/UartDevice/include
|
||||||
|
)
|
||||||
|
#do not rely on any other library
|
||||||
|
#link_directories(
|
||||||
|
#)
|
||||||
|
|
||||||
|
aux_source_directory(./src SRC_FILES)
|
||||||
|
|
||||||
|
set(TARGET_NAME StorageManager)
|
||||||
|
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
|
||||||
|
|
||||||
|
target_link_libraries(${TARGET_NAME} StatusCode Log)
|
||||||
|
|
||||||
|
if ("${COMPILE_IMPROVE_SUPPORT}" MATCHES "true")
|
||||||
|
add_custom_target(
|
||||||
|
StorageManager_code_check
|
||||||
|
COMMAND ${CLANG_TIDY_EXE}
|
||||||
|
-checks='${CLANG_TIDY_CHECKS}'
|
||||||
|
--header-filter=.*
|
||||||
|
--system-headers=false
|
||||||
|
${SRC_FILES}
|
||||||
|
${CLANG_TIDY_CONFIG}
|
||||||
|
-p ${PLATFORM_PATH}/cmake-shell
|
||||||
|
WORKING_DIRECTORY ${MIDDLEWARE_SOURCE_PATH}/StorageManager
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${TARGET_NAME}
|
||||||
|
PRE_BUILD
|
||||||
|
COMMAND make StorageManager_code_check
|
||||||
|
WORKING_DIRECTORY ${PLATFORM_PATH}/cmake-shell/
|
||||||
|
)
|
||||||
|
file(GLOB_RECURSE HEADER_FILES *.h)
|
||||||
|
add_custom_target(
|
||||||
|
StorageManager_code_format
|
||||||
|
COMMAND ${CLANG_FORMAT_EXE}
|
||||||
|
-style=file
|
||||||
|
-i ${SRC_FILES} ${HEADER_FILES}
|
||||||
|
WORKING_DIRECTORY ${MIDDLEWARE_SOURCE_PATH}/StorageManager
|
||||||
|
)
|
||||||
|
add_custom_command(
|
||||||
|
TARGET ${TARGET_NAME}
|
||||||
|
PRE_BUILD
|
||||||
|
COMMAND make StorageManager_code_check
|
||||||
|
COMMAND make StorageManager_code_format
|
||||||
|
WORKING_DIRECTORY ${PLATFORM_PATH}/cmake-shell/
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
define_file_name(${TARGET_NAME})
|
||||||
|
|
||||||
|
file(GLOB_RECURSE INSTALL_HEADER_FILES include/*.h)
|
||||||
|
install(FILES ${INSTALL_HEADER_FILES} DESTINATION include)
|
18
middleware/StorageManager/include/IStorageManager.h
Normal file
18
middleware/StorageManager/include/IStorageManager.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Fancy Code.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
#ifndef I_STORAGE_MANAGER_H
|
||||||
|
#define I_STORAGE_MANAGER_H
|
||||||
|
|
||||||
|
#endif
|
15
middleware/StorageManager/src/IStorageManager.cpp
Normal file
15
middleware/StorageManager/src/IStorageManager.cpp
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 Fancy Code.
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
#include "IStorageManager.h"
|
Loading…
Reference in New Issue
Block a user