termo/cmake/FindNcursesw.cmake

18 lines
552 B
CMake
Raw Normal View History

2016-01-14 20:12:22 +01:00
# Public Domain
find_package (PkgConfig REQUIRED)
2020-09-14 18:00:31 +02:00
pkg_check_modules (Ncursesw QUIET ncursesw)
2016-01-14 20:12:22 +01:00
# OpenBSD doesn't provide a pkg-config file
2020-09-14 18:00:31 +02:00
set (required_vars Ncursesw_LIBRARIES)
if (NOT Ncursesw_FOUND)
find_library (Ncursesw_LIBRARIES NAMES ncursesw)
find_path (Ncursesw_INCLUDE_DIRS ncurses.h)
list (APPEND required_vars Ncursesw_INCLUDE_DIRS)
endif (NOT Ncursesw_FOUND)
2016-01-14 20:12:22 +01:00
include (FindPackageHandleStandardArgs)
2020-09-14 18:00:31 +02:00
FIND_PACKAGE_HANDLE_STANDARD_ARGS (Ncursesw DEFAULT_MSG ${required_vars})
2016-01-14 20:12:22 +01:00
2020-09-14 18:00:31 +02:00
mark_as_advanced (Ncursesw_LIBRARIES Ncursesw_INCLUDE_DIRS)