liberty/cmake/FindNcursesw.cmake

18 lines
574 B
CMake
Raw Normal View History

2017-01-23 22:55:46 +01:00
# Public Domain
find_package (PkgConfig REQUIRED)
2020-10-02 06:46:31 +02:00
pkg_check_modules (Ncursesw QUIET ncursesw)
2017-01-23 22:55:46 +01:00
# OpenBSD doesn't provide a pkg-config file
2020-10-02 06:46:31 +02:00
set (required_vars Ncursesw_LIBRARIES)
if (NOT Ncursesw_FOUND)
find_library (Ncursesw_LIBRARIES NAMES ncursesw)
2023-07-24 08:09:08 +02:00
find_path (Ncursesw_INCLUDE_DIRS ncurses.h PATH_SUFFIXES ncurses)
2020-10-02 06:46:31 +02:00
list (APPEND required_vars Ncursesw_INCLUDE_DIRS)
endif (NOT Ncursesw_FOUND)
2017-01-23 22:55:46 +01:00
include (FindPackageHandleStandardArgs)
2020-10-02 06:46:31 +02:00
FIND_PACKAGE_HANDLE_STANDARD_ARGS (Ncursesw DEFAULT_MSG ${required_vars})
2017-01-23 22:55:46 +01:00
2020-10-02 06:46:31 +02:00
mark_as_advanced (Ncursesw_LIBRARIES Ncursesw_INCLUDE_DIRS)