Commit Graph

6 Commits (master)

Author SHA1 Message Date
nick black a5244632da
NotcursesConfig.cmake: list -lnotcurses-core #1301 3 years ago
Marek Habersack 9135663529 [CMake] Restore old way of importing Notcurses into a cmake project
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.
4 years ago
Marek Habersack c5c9432ac0 [Misc] A hodgepodge of tiny changes
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`)
4 years ago
nick black e1863317a3
CMake: conform to cmake capitalization conventions 4 years ago
nick black fd9ff4ebe6 CMake: same as it ever was 4 years ago
nick black a413fb8bc9 notcurses->Notcurses for CMake module 4 years ago