Partially reverts: c5c9432ac0
Context: https://github.com/dankamongmen/notcurses/pull/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:
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`)