summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-10-29 15:31:08 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-10-29 15:31:08 (GMT)
commit0d6cdce5b5542250c067d846f037dfeca1bcc8e4 (patch)
tree04488115e680b1b29100832986537ac86acbf993
parent8451f123503effc219fb1fb816b9659b7e156653 (diff)
parentf11f957949786295f6cd9e2efc5a333fa905ccc7 (diff)
downloadCMake-0d6cdce5b5542250c067d846f037dfeca1bcc8e4.zip
CMake-0d6cdce5b5542250c067d846f037dfeca1bcc8e4.tar.gz
CMake-0d6cdce5b5542250c067d846f037dfeca1bcc8e4.tar.bz2
Merge topic 'FindCurses-include-CheckLibraryExists'
f11f9579 FindCurses: Include CheckLibraryExists before using it (#15220)
-rw-r--r--Modules/FindCurses.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/FindCurses.cmake b/Modules/FindCurses.cmake
index 0184c39..a21ca89 100644
--- a/Modules/FindCurses.cmake
+++ b/Modules/FindCurses.cmake
@@ -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})