game: Aligned Cmake with Make
- Conway's Game of Life #3210
Signed-off-by: simbit18 <simbit18@gmail.com>
diff --git a/games/CMakeLists.txt b/games/CMakeLists.txt
index 4931fc4..51680d9 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/cgol/CMakeLists.txt b/games/cgol/CMakeLists.txt
new file mode 100644
index 0000000..b496011
--- /dev/null
+++ b/games/cgol/CMakeLists.txt
@@ -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()
diff --git a/games/cgol/Makefile b/games/cgol/Makefile
index 2aa5433..5659a29 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)