add CMake build option#135
Open
scivision wants to merge 14 commits into
Open
Conversation
e55cfac to
db6566a
Compare
d1bd74d to
e5ff212
Compare
30c638c to
c43315c
Compare
Repository owner
deleted a comment from
Bill-Gray
Mar 22, 2024
916ff08 to
266f5ae
Compare
6604cbb to
757699e
Compare
`PDC_WIDE` define is used in public interface (in curses.h), so it must be available in `PUBLIC` scope.
There was a problem hiding this comment.
Pull request overview
Adds a CMake-based build/install system (including presets) for PDCurses and its demos, and wires up GitHub Actions CI to build/test/package across multiple platforms.
Changes:
- Introduces top-level CMake build, install/export, and packaging support (plus toolchain/helpers for X11 and DOS/OpenWatcom).
- Adds CMake build + a minimal CTest smoke test for
demos/. - Documents CMake usage and adds a CI workflow to exercise the new build.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
CMakeLists.txt |
New top-level CMake build for PDCurses with platform backends and install/export wiring |
CMakePresets.json |
Adds configure/build/test/workflow presets for Ninja/MSVC/DOS |
cmake/compilers.cmake |
Compiler-specific flags (notably OpenWatcom) |
cmake/config.cmake.in |
Package config template for find_package(PDCurses CONFIG) |
cmake/dos.cmake |
OpenWatcom DOS toolchain file |
cmake/dos.ps1 |
Helper to set up OpenWatcom env on Windows |
cmake/dos.sh |
Helper to set up OpenWatcom env on Unix-like systems |
cmake/install.cmake |
Export/install + CPack packaging boilerplate |
cmake/x11.cmake |
X11 dependency and include path discovery |
demos/CMakeLists.txt |
CMake build for demos + CTest registration |
demos/CMakePresets.json |
Inherits top-level presets for building demos via workflow |
demos/README.md |
Documents building demos with CMake + installed PDCurses |
demos/test_init.c |
Adds a minimal initialization smoke test binary for CTest/CI |
docs/README.md |
Documents CMake build/install steps and X11 prereqs |
.github/workflows/ci.yml |
Adds CI workflow to build/install/test/package via CMake workflows |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| int main(void){ | ||
| WINDOW* w = initscr(); | ||
| if(w == NULL){ | ||
| fprintf(stderr, "Error initialising ncurses.\n"); |
There was a problem hiding this comment.
The error message says "ncurses" but this demo is intended to validate PDCurses; this will be confusing when diagnosing failures. Update the message to refer to PDCurses (or just "curses") consistently with the rest of the project.
Suggested change
| fprintf(stderr, "Error initialising ncurses.\n"); | |
| fprintf(stderr, "Error initialising PDCurses.\n"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CMake builds for Windows, macOS and Linux. Uses X11, SDL, or wincon. Static or shared. UTF8, WIDE or not.