game: Aligned Cmake with Make

- Conway's Game of Life #3210

Signed-off-by: simbit18 <simbit18@gmail.com>
This commit is contained in:
simbit18 2025-11-14 12:11:04 +01:00 committed by Xiang Xiao
parent 31d567e880
commit c7ac717167
3 changed files with 40 additions and 1 deletions

View file

@ -20,4 +20,6 @@
#
# ##############################################################################
nuttx_add_subdirectory()
nuttx_generate_kconfig(MENUDESC "Games")

37
games/cgol/CMakeLists.txt Normal file
View file

@ -0,0 +1,37 @@
# ##############################################################################
# apps/games/cgol/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you 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.
#
# ##############################################################################
# CGOL game info
if(CONFIG_GAMES_CGOL)
nuttx_add_application(
NAME
${CONFIG_GAMES_CGOL_PROGNAME}
PRIORITY
${CONFIG_GAMES_CGOL_PRIORITY}
STACKSIZE
${CONFIG_GAMES_CGOL_STACKSIZE}
MODULE
${CONFIG_GAMES_CGOL}
SRCS
cgol_main.c)
endif()

View file

@ -22,7 +22,7 @@
include $(APPDIR)/Make.defs
# Snake game info
# CGOL game info
PROGNAME = $(CONFIG_GAMES_CGOL_PROGNAME)
PRIORITY = $(CONFIG_GAMES_CGOL_PRIORITY)