Skip to content
Snippets Groups Projects
Commit f11f9579 authored by Brad King's avatar Brad King
Browse files

FindCurses: Include CheckLibraryExists before using it (#15220)

Include the module at the top unconditionally so that all code paths can
use it.
parent 54ff77dc
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,8 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
find_library(CURSES_CURSES_LIBRARY NAMES curses )
find_library(CURSES_NCURSES_LIBRARY NAMES ncurses )
......@@ -81,7 +83,6 @@ endif()
# prefix as the library was found, if still not found, try curses.h with the
# default search paths.
if(CURSES_CURSES_LIBRARY AND CURSES_NEED_NCURSES)
include(${CMAKE_CURRENT_LIST_DIR}/CheckLibraryExists.cmake)
include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET ${Curses_FIND_QUIETLY})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment