删除库进行重构,结构优化不好
This commit is contained in:
@ -1,54 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
# Project name
|
||||
project(menu_component C)
|
||||
|
||||
# Set C standard
|
||||
set(CMAKE_C_STANDARD 99)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
# Force using MinGW Makefiles if on Windows
|
||||
if(WIN32)
|
||||
if(NOT DEFINED CMAKE_GENERATOR)
|
||||
set(CMAKE_GENERATOR "MinGW Makefiles" CACHE INTERNAL "")
|
||||
endif()
|
||||
# Set default compiler if not specified
|
||||
if(NOT DEFINED CMAKE_C_COMPILER)
|
||||
find_program(MINGW_GCC gcc)
|
||||
if(MINGW_GCC)
|
||||
set(CMAKE_C_COMPILER ${MINGW_GCC} CACHE INTERNAL "")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Compiler flags
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Werror -Os")
|
||||
|
||||
# Include directories
|
||||
include_directories(
|
||||
api
|
||||
internal
|
||||
src/core
|
||||
src/param
|
||||
src/lang
|
||||
src/utils
|
||||
src/features
|
||||
port
|
||||
)
|
||||
|
||||
# Source files
|
||||
set(SOURCES
|
||||
src/core/menu_core.c
|
||||
src/param/menu_param.c
|
||||
src/lang/menu_lang.c
|
||||
src/utils/menu_utils.c
|
||||
src/features/menu_modbus.c
|
||||
port/menu_port.c
|
||||
examples/menu_example.c
|
||||
)
|
||||
|
||||
# Add example executable
|
||||
add_executable(menu_example ${SOURCES})
|
||||
|
||||
# Debug build configuration
|
||||
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
|
||||
Reference in New Issue
Block a user