Swatantra-66 opened a new pull request, #3862:
URL: https://github.com/apache/nuttx-apps/pull/3862
## Summary
Addresses the CMake vs. Make build-system gap for `apps/games/NXDoom`
identified in issue apache/nuttx#19549 ("*[Analysis] CMake vs. Make
Build-System Gap Analysis*"):
Adds `apps/games/NXDoom/CMakeLists.txt` providing CMake build configuration
for the NXDoom game port:
- Declares the `nxdoom` application target via `nuttx_add_application` with
configurable priority (`CONFIG_GAMES_NXDOOM_PRIORITY`) and stack size
(`CONFIG_GAMES_NXDOOM_STACKSIZE`).
- Includes common sources (`i_system.c`, `m_argv.c`, `m_misc.c`,
`z_native.c`), dehacked sources, base sources, and doom core engine sources.
- Implements conditional compilation matching `Makefile`:
- `CONFIG_GAMES_NXDOOM_ENDOOM`: includes `src/i_endoom.c` and textscreen
widgets.
- `CONFIG_GAMES_NXDOOM_NET`: includes networking logic and textscreen
widgets.
- `CONFIG_GAMES_NXDOOM_SOUND`: includes audio, MIDI, and sound effect
sources.
- `CONFIG_GAMES_NXDOOM_RTTTL_MUSIC`: includes RTTTL music playback support.
- Configures include paths for `src`, `src/doom`, `textscreen`, and
`pcsound`.
Addresses apache/nuttx#19549
Together with #3861, this completes 100% CMake build support for all games
in `apps/games`.
## Impact
- **New Feature:** Enables CMake build configuration and compilation for
`NXDoom`.
- **Existing Feature:** No change to existing Make build or runtime logic.
- **Compatibility:** Fully backwards compatible.
## Testing
- **Host:** Linux x86_64 (Ubuntu / WSL2)
- **Toolchain:** GCC 15.2.0, CMake 4.2.3, Ninja 1.13.2
- **Verification:** Formatted with `cmake-format` and verified with
`checkpatch.sh`.
- **Target:** `sim:nsh` (with `CONFIG_GAMES_NXDOOM=y`,
`CONFIG_ALLOW_GPL_COMPONENTS=y`, `CONFIG_DRIVERS_VIDEO=y`, `CONFIG_VIDEO_FB=y`,
`CONFIG_CRYPTO=y`, `CONFIG_LIBC_LOCALE=y`).
### Build Log:
```text
$ cmake -B build -DBOARD_CONFIG=sim:nsh -GNinja
-- Initializing NuttX
-- CMake: 4.2.3
-- Ninja: 1.13.2
-- Board: sim
-- Config: nsh
-- Appdir: /path/to/nuttx-apps
-- Configuring done (100.4s)
-- Generating done (10.9s)
-- Build files have been written to: build
$ cmake --build build --target apps_nxdoom
[1/94] Building C object
apps/games/NXDoom/CMakeFiles/apps_nxdoom.dir/src/z_native.c.o
[2/94] Building C object
apps/games/NXDoom/CMakeFiles/apps_nxdoom.dir/src/i_main.c.o
[3/94] Building C object
apps/games/NXDoom/CMakeFiles/apps_nxdoom.dir/src/m_argv.c.o
...
[92/94] Building C object
apps/games/NXDoom/CMakeFiles/apps_nxdoom.dir/src/doom/st_stuff.c.o
[93/94] Building C object
apps/games/NXDoom/CMakeFiles/apps_nxdoom.dir/src/doom/wi_stuff.c.o
[94/94] Linking C static library apps/games/NXDoom/libapps_nxdoom.a
[94/94] Built target apps_nxdoom
```
*(Note: NXDoom runtime execution requires an external DOOM IWAD game data
file (e.g. `doom1.wad`) in `/data/` and an active framebuffer display driver;
verified static library compilation and symbol linking).*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]