-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
[Misc] A hodgepodge of tiny changes #1146
Conversation
CMake: Simplify cmake target+version config generation and make it actually work. With the changes it is now possible to detect and use `Notcurses` in the following way: find_package(Notcurses REQUIRED) ... target_link_libraries(myapp PRIVATE notcurses::notcurses) Also, added the same CMake configuration for `Notcurses++`, to be used in the following way: find_package(Notcurses REQUIRED find_package(Notcurses++ REQUIRED) ... target_link_libraries(myapp PRIVATE notcurses++::notcurses++) Docs: `notcurses_cell(3)`: `cell_styles_{on,off} -> cell_{on,off}_styles` and `cell_load_simple` -> `cell_load_char` C++ API: * Plane: added constructors taking `ncplane_options const&` instead of the multitude of individual parameters * Plane: drop `struct` when `ncplane_options` is used. * Plane: added `strdup` (`cell_strdup`) * Plane: added `extract` (`cell_extract`)
Will the existing CMake
and would be loathe to break anyone's working CMake configurations. I figure it will, but just checking. I guess I can test this easily enough myself. |
Everything else looks great, thanks! Take a look at #1143 if you can, please. |
@@ -56,9 +56,9 @@ typedef struct cell { | |||
|
|||
**unsigned cell_styles(const cell* ***c***);** | |||
|
|||
**void cell_styles_on(cell* ***c***, unsigned ***stylebits***);** | |||
**void cell_on_styles(cell* ***c***, unsigned ***stylebits***);** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh. I'd rather switch cell_{on, off}_styles
in the actual API to match ncplane_styles_*
, but Allah, the All-Powerful, has fucked us once again. Guess I just missed this in 2.0 API review. Bah! Thanks a lot for this find.
I'm going to go ahead and fix it in USAGE.md
as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it in USAGE.md
. cell_load_char()
was already correct there.
.y = yoff, | ||
.x = xoff, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my bad
throw init_error ("Notcurses failed to create an aligned plane"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've picked up your man page fixes and replicated them in USAGE.md. everything looks good.
It should work, but the |
oh sure, and i'll likely update my own cmake configs, just i don't want "FUCKED UP MY WORKING CMAKE BUILD" on my tombstone |
oh there is an unfortunate ambiguity here. i am not saying that cmake worked following an ass-fucking; on the contrary, this tombstone claims that by breaking the speaker's once-working cmake config, i fucked them in the ass |
Hey, shit happens, better things replace worse things :) |
while we have not yet conquered the world, and I'm still waiting for my Turing award and parade, we have acquired real users, real as in real reverse-deps in distributions that you've heard of, and when i break existing stuff and trigger debian/fedora FTBFS (failed-to-build-from-source) bugs....well, not sharing a border with them, i take taciturn German DBTS reports very seriously and am made to feel a wretched failure of a fat, loud american. the upstream authors deal with these changes with panache and elan. but debian gets more unhappy than you can imagine when this happens, and pathetic vain me is aiming to become a Debian Developer (from Maintainer) sometime this life, and black eyes like that do not help my case. besides that, cmake sucks, and breaking it seems especially unwelcome. but yeah, my stuff above is all driven off |
Well, it seems my (untested) assumption was wrong - the new way does not add the variables you mentioned earlier. Doh. I'll open a new PR to partially revert the changes, so that
I was a DD for 10 years... It was fun :)
Nah, it's ok. As any build/metabuild system it has its down and upsides. I rather like it over autotools or meson
I will still open the partial revert PR. You're right that we don't know how many folks out there use |
Bummer, I need to revert the |
Partially reverts: c5c9432 Context: dankamongmen#1146 The above commit implemented the much more convenient way of finding and using a package from CMake, however it broke compatibility with the way id had been before, which defined various `Notcurses_*` variables. Revert the `Notcurses` component to the old way and add support for `Notcurses++` in the same fashion. Perhaps one day we should think of implementing `find_package` support by way of a module, which should make it possible to have the cake and eat the cake. One day.
Partially reverts: c5c9432 Context: #1146 The above commit implemented the much more convenient way of finding and using a package from CMake, however it broke compatibility with the way id had been before, which defined various `Notcurses_*` variables. Revert the `Notcurses` component to the old way and add support for `Notcurses++` in the same fashion. Perhaps one day we should think of implementing `find_package` support by way of a module, which should make it possible to have the cake and eat the cake. One day.
CMake:
Simplify cmake target+version config generation and make it actually
work. With the changes it is now possible to detect and use
Notcurses
in the following way:Also, added the same CMake configuration for
Notcurses++
, to be usedin the following way:
Docs:
notcurses_cell(3)
:cell_styles_{on,off} -> cell_{on,off}_styles
and
cell_load_simple
->cell_load_char
C++ API:
ncplane_options const&
instead ofthe multitude of individual parameters
struct
whenncplane_options
is used.strdup
(cell_strdup
)extract
(cell_extract
)