|
@@ -573,22 +573,24 @@ macro (CMAKE_BUILD_UTILITIES)
|
|
|
#---------------------------------------------------------------------
|
|
#---------------------------------------------------------------------
|
|
|
# Use curses?
|
|
# Use curses?
|
|
|
if (UNIX)
|
|
if (UNIX)
|
|
|
- # there is a bug in the Syllable libraries which makes linking ccmake fail, Alex
|
|
|
|
|
- if(NOT CMAKE_SYSTEM_NAME MATCHES syllable)
|
|
|
|
|
- set(CURSES_NEED_NCURSES TRUE)
|
|
|
|
|
- find_package(Curses QUIET)
|
|
|
|
|
- if (CURSES_LIBRARY)
|
|
|
|
|
- option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" ON)
|
|
|
|
|
- else ()
|
|
|
|
|
- message("Curses libraries were not found. Curses GUI for CMake will not be built.")
|
|
|
|
|
- set(BUILD_CursesDialog 0)
|
|
|
|
|
- endif ()
|
|
|
|
|
- else()
|
|
|
|
|
- set(BUILD_CursesDialog 0)
|
|
|
|
|
|
|
+ if(NOT DEFINED BUILD_CursesDialog)
|
|
|
|
|
+ include(${CMake_SOURCE_DIR}/Source/Checks/Curses.cmake)
|
|
|
|
|
+ option(BUILD_CursesDialog "Build the CMake Curses Dialog ccmake" "${CMakeCheckCurses_COMPILED}")
|
|
|
endif()
|
|
endif()
|
|
|
else ()
|
|
else ()
|
|
|
set(BUILD_CursesDialog 0)
|
|
set(BUILD_CursesDialog 0)
|
|
|
endif ()
|
|
endif ()
|
|
|
|
|
+ if(BUILD_CursesDialog)
|
|
|
|
|
+ set(CURSES_NEED_NCURSES TRUE)
|
|
|
|
|
+ find_package(Curses)
|
|
|
|
|
+ if(NOT CURSES_FOUND)
|
|
|
|
|
+ message(WARNING
|
|
|
|
|
+ "'ccmake' will not be built because Curses was not found.\n"
|
|
|
|
|
+ "Turn off BUILD_CursesDialog to suppress this message."
|
|
|
|
|
+ )
|
|
|
|
|
+ set(BUILD_CursesDialog 0)
|
|
|
|
|
+ endif()
|
|
|
|
|
+ endif()
|
|
|
if(BUILD_CursesDialog)
|
|
if(BUILD_CursesDialog)
|
|
|
if(NOT CMAKE_USE_SYSTEM_FORM)
|
|
if(NOT CMAKE_USE_SYSTEM_FORM)
|
|
|
add_subdirectory(Source/CursesDialog/form)
|
|
add_subdirectory(Source/CursesDialog/form)
|