整定一版
This commit is contained in:
@ -1,33 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# 添加当前目录和上级目录作为包含目录
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hmi/inc
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/language
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
|
||||
# 收集示例所需的源文件
|
||||
set(EXAMPLE_SOURCES
|
||||
demo.c
|
||||
language/language.c
|
||||
hmi/src/mainhmi.c
|
||||
hmi/src/hmi_common.c
|
||||
hmi/src/hmi_camera.c
|
||||
hmi/src/hmi_more_set.c
|
||||
hmi/src/hmi_music.c
|
||||
hmi/src/hmi_set.c
|
||||
hmi/src/hmi_video.c
|
||||
)
|
||||
|
||||
# 创建demo可执行程序
|
||||
add_executable(demo ${EXAMPLE_SOURCES})
|
||||
|
||||
# 链接menu库
|
||||
target_link_libraries(demo PRIVATE menu)
|
||||
|
||||
# 安装规则
|
||||
install(TARGETS demo
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
83
examples/build/CMakeCache.txt
Normal file
83
examples/build/CMakeCache.txt
Normal file
@ -0,0 +1,83 @@
|
||||
# This is the CMakeCache file.
|
||||
# For build in directory: e:/Jfen_work/local_git_code/menu/examples/build
|
||||
# It was generated by CMake: C:/Users/ZHIZHANKEJI/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/bin/cmake.exe
|
||||
# You can edit this file to change values found and used by cmake.
|
||||
# If you do not want to change any of the values, simply exit the editor.
|
||||
# If you do want to change a value, simply edit, save, and exit the editor.
|
||||
# The syntax for the file is as follows:
|
||||
# KEY:TYPE=VALUE
|
||||
# KEY is the name of a variable in the cache.
|
||||
# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
|
||||
# VALUE is the current value for the KEY.
|
||||
|
||||
########################
|
||||
# EXTERNAL cache entries
|
||||
########################
|
||||
|
||||
//Value Computed by CMake.
|
||||
CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=E:/Jfen_work/local_git_code/menu/examples/build/CMakeFiles/pkgRedirects
|
||||
|
||||
//Program used to build from makefiles.
|
||||
CMAKE_MAKE_PROGRAM:STRING=nmake
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_DESCRIPTION:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
|
||||
|
||||
//Value Computed by CMake
|
||||
CMAKE_PROJECT_NAME:STATIC=Project
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_BINARY_DIR:STATIC=E:/Jfen_work/local_git_code/menu/examples/build
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_IS_TOP_LEVEL:STATIC=ON
|
||||
|
||||
//Value Computed by CMake
|
||||
Project_SOURCE_DIR:STATIC=E:/Jfen_work/local_git_code/menu/examples
|
||||
|
||||
|
||||
########################
|
||||
# INTERNAL cache entries
|
||||
########################
|
||||
|
||||
//This is the directory where this CMakeCache.txt was created
|
||||
CMAKE_CACHEFILE_DIR:INTERNAL=e:/Jfen_work/local_git_code/menu/examples/build
|
||||
//Major version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
|
||||
//Minor version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_MINOR_VERSION:INTERNAL=31
|
||||
//Patch version of cmake used to create the current loaded cache
|
||||
CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
|
||||
//Path to CMake executable.
|
||||
CMAKE_COMMAND:INTERNAL=C:/Users/ZHIZHANKEJI/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/bin/cmake.exe
|
||||
//Path to cpack program executable.
|
||||
CMAKE_CPACK_COMMAND:INTERNAL=C:/Users/ZHIZHANKEJI/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/bin/cpack.exe
|
||||
//Path to ctest program executable.
|
||||
CMAKE_CTEST_COMMAND:INTERNAL=C:/Users/ZHIZHANKEJI/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/bin/ctest.exe
|
||||
//Path to cache edit program executable.
|
||||
CMAKE_EDIT_COMMAND:INTERNAL=C:/Users/ZHIZHANKEJI/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/bin/cmake-gui.exe
|
||||
//Name of external makefile project generator.
|
||||
CMAKE_EXTRA_GENERATOR:INTERNAL=
|
||||
//Name of generator.
|
||||
CMAKE_GENERATOR:INTERNAL=NMake Makefiles
|
||||
//Generator instance identifier.
|
||||
CMAKE_GENERATOR_INSTANCE:INTERNAL=
|
||||
//Name of generator platform.
|
||||
CMAKE_GENERATOR_PLATFORM:INTERNAL=
|
||||
//Name of generator toolset.
|
||||
CMAKE_GENERATOR_TOOLSET:INTERNAL=
|
||||
//Source directory with the top level CMakeLists.txt file for this
|
||||
// project
|
||||
CMAKE_HOME_DIRECTORY:INTERNAL=E:/Jfen_work/local_git_code/menu/examples
|
||||
//ADVANCED property for variable: CMAKE_MAKE_PROGRAM
|
||||
CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
|
||||
//number of local generators
|
||||
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
|
||||
//Platform information initialized
|
||||
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
|
||||
//Path to CMake installation.
|
||||
CMAKE_ROOT:INTERNAL=C:/Users/ZHIZHANKEJI/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/share/cmake-3.31
|
||||
|
||||
15
examples/build/CMakeFiles/3.31.2/CMakeSystem.cmake
Normal file
15
examples/build/CMakeFiles/3.31.2/CMakeSystem.cmake
Normal file
@ -0,0 +1,15 @@
|
||||
set(CMAKE_HOST_SYSTEM "Windows-10.0.26200")
|
||||
set(CMAKE_HOST_SYSTEM_NAME "Windows")
|
||||
set(CMAKE_HOST_SYSTEM_VERSION "10.0.26200")
|
||||
set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
|
||||
|
||||
|
||||
|
||||
set(CMAKE_SYSTEM "Windows-10.0.26200")
|
||||
set(CMAKE_SYSTEM_NAME "Windows")
|
||||
set(CMAKE_SYSTEM_VERSION "10.0.26200")
|
||||
set(CMAKE_SYSTEM_PROCESSOR "AMD64")
|
||||
|
||||
set(CMAKE_CROSSCOMPILING "FALSE")
|
||||
|
||||
set(CMAKE_SYSTEM_LOADED 1)
|
||||
11
examples/build/CMakeFiles/CMakeConfigureLog.yaml
Normal file
11
examples/build/CMakeFiles/CMakeConfigureLog.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
---
|
||||
events:
|
||||
-
|
||||
kind: "message-v1"
|
||||
backtrace:
|
||||
- "C:/Users/ZHIZHANKEJI/AppData/Local/Programs/Python/Python311/Lib/site-packages/cmake/data/share/cmake-3.31/Modules/CMakeDetermineSystem.cmake:205 (message)"
|
||||
- "CMakeLists.txt"
|
||||
message: |
|
||||
The system is: Windows - 10.0.26200 - AMD64
|
||||
...
|
||||
1
examples/build/CMakeFiles/cmake.check_cache
Normal file
1
examples/build/CMakeFiles/cmake.check_cache
Normal file
@ -0,0 +1 @@
|
||||
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
|
||||
@ -1,65 +0,0 @@
|
||||
|
||||
/* 菜单显示效果图可看:
|
||||
|
||||
https://blog.csdn.net/qq_24130227/article/details/121167276
|
||||
|
||||
*/
|
||||
|
||||
#include "menu.h"
|
||||
#include "mainhmi.h"
|
||||
#include "language.h"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
int isEnterMenu = 0;
|
||||
|
||||
void EnterMainMenu(const MenuItemInfo_t *pItemInfo)
|
||||
{
|
||||
isEnterMenu = 1;
|
||||
}
|
||||
|
||||
void ExitMainMenu(const MenuItemInfo_t *pItemInfo)
|
||||
{
|
||||
isEnterMenu = 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
int cmd = 0;
|
||||
int8_t musicMenuId, languageMenuId, moreSetMenuId;
|
||||
|
||||
MainMenuCfg_t tMainMenu = MENU_ITEM_BIND(TEXT_MAIN_MENU, EnterMainMenu, ExitMainMenu, Hmi_LoadMainHmi, Hmi_MainTask, NULL);
|
||||
|
||||
Menu_Init(&tMainMenu);
|
||||
|
||||
while (1)
|
||||
{
|
||||
CLEAR();
|
||||
MOVETO(0, 0);
|
||||
|
||||
if (!isEnterMenu)
|
||||
{
|
||||
printf("%s(0-%s%s; 1-%s): ", get_text(TEXT_SELECT_OPTION),
|
||||
get_text(TEXT_ENTER), get_text(TEXT_MAIN_MENU), get_text(TEXT_EXIT));
|
||||
scanf(" %d", &cmd); // 空格作用是忽略上次的回车
|
||||
|
||||
if (cmd == 0)
|
||||
{
|
||||
Menu_MainEnter();
|
||||
|
||||
CLEAR();
|
||||
MOVETO(0, 0);
|
||||
}
|
||||
else if (cmd == 1)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Menu_Task();
|
||||
}
|
||||
|
||||
Menu_DeInit();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user