This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new c7ac71716 game: Aligned Cmake with Make
c7ac71716 is described below
commit c7ac7171673c5e8c12945b0c89d7a2537fd88745
Author: simbit18 <[email protected]>
AuthorDate: Fri Nov 14 12:11:04 2025 +0100
game: Aligned Cmake with Make
- Conway's Game of Life #3210
Signed-off-by: simbit18 <[email protected]>
---
games/CMakeLists.txt | 2 ++
games/{ => cgol}/CMakeLists.txt | 18 ++++++++++++++++--
games/cgol/Makefile | 2 +-
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/games/CMakeLists.txt b/games/CMakeLists.txt
index 4931fc460..51680d9d6 100644
--- a/games/CMakeLists.txt
+++ b/games/CMakeLists.txt
@@ -20,4 +20,6 @@
#
#
##############################################################################
+nuttx_add_subdirectory()
+
nuttx_generate_kconfig(MENUDESC "Games")
diff --git a/games/CMakeLists.txt b/games/cgol/CMakeLists.txt
similarity index 76%
copy from games/CMakeLists.txt
copy to games/cgol/CMakeLists.txt
index 4931fc460..b496011a4 100644
--- a/games/CMakeLists.txt
+++ b/games/cgol/CMakeLists.txt
@@ -1,5 +1,5 @@
#
##############################################################################
-# apps/games/CMakeLists.txt
+# apps/games/cgol/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
@@ -20,4 +20,18 @@
#
#
##############################################################################
-nuttx_generate_kconfig(MENUDESC "Games")
+# 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()
diff --git a/games/cgol/Makefile b/games/cgol/Makefile
index 2aa5433cd..5659a2908 100644
--- a/games/cgol/Makefile
+++ b/games/cgol/Makefile
@@ -22,7 +22,7 @@
include $(APPDIR)/Make.defs
-# Snake game info
+# CGOL game info
PROGNAME = $(CONFIG_GAMES_CGOL_PROGNAME)
PRIORITY = $(CONFIG_GAMES_CGOL_PRIORITY)