10000 Major CMake Cleanup by kadler · Pull Request #38 · tn5250/tn5250 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Major CMake Cleanup #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 1, 2025
Merged

Major CMake Cleanup #38

merged 5 commits into from
May 1, 2025

Conversation

kadler
Copy link
Contributor
@kadler kadler commented Mar 25, 2025
  • Simplify CMake config in to curses or win32 versions
  • Use CMake features more effectively
  • Require curses library be ncurses

kadler added 4 commits March 21, 2025 15:42
These seem to have been copied from the autoconf config.h.in, but those
are added automatically by default by autoconf. We don't actually use or
need these checks so remove them (if we don't have stdio.h, we've got
bigger problems!).
- Use builtin WIN32 variable for Windows conditions
- Only build win32 or curses, depending on platform
- Make curses required, no need to check if found
- Require curses library be NCurses
- Move subproject conditions up to main CMakeLists.txt, which now gate
  the add_subdirectory
- Add Windows dependencies to their respective targets (lib5250 needs
  Winsock and tn5250-win needs Winmm for PlaySound)
- Remove redundant add_dependencies (target_link_libraries does this
  already)
- Only link OpenSSL libraries if it was found
- Rename curses target to tn5250 now that it's mutually exclusive with
  win32
- Set project definitions through configure_file instead of extraneous
  add_definitions
@kadler kadler requested a review from NattyNarwhal March 25, 2025 14:39
@NattyNarwhal
Copy link
Contributor

FWIW, I also have an incomplete branch (no PR yet) to clean up and put CMake at parity, then remove autotools (though we might not be ready for that). This branch has more CMake cleanups, though feel free to cherry pick the CMake changes I've made. I put back Windows lp5250 and the key handling option, but I hadn't yet however gotten around to adding back xt5250, termcaps, or public API lib5250... which I'm not sure if we want to keep anyways.

Needs testing.

This needs to be wired up to the installer as well... which needs to be
hooked up via CI or something.

Co-authored-by: Korinne Adler <kadler@us.ibm.com>
@kadler
Copy link
Contributor Author
kadler commented Mar 25, 2025

Right now I feel like the CMake build can be the test ground for stuff going forward so I'm fine with not having parity with autoconf build. Especially with stuff like xt5250, lib5250 shared library, termcaps, etc. The Windows lp5250 stuff would likely be good to bring over, though.

@kadler kadler merged commit a33407e into main May 1, 2025
5 checks passed
@kadler kadler deleted the cmake-cleanup branch May 1, 2025 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0