From 2b1607114985e56a7847eb6081d5656f73c230d0 Mon Sep 17 00:00:00 2001 From: Tushar Maheshwari Date: Thu, 26 Sep 2019 08:36:24 +0530 Subject: CursesDialog: modernize CMake usage --- Source/CMakeLists.txt | 2 +- Source/CursesDialog/CMakeLists.txt | 36 ++++++++++++++++-------------------- 2 files changed, 17 insertions(+), 21 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 8ed7b2f..fe048cb 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1142,7 +1142,7 @@ target_link_libraries(cpack CPackLib) # Curses GUI if(BUILD_CursesDialog) - include(${CMake_SOURCE_DIR}/Source/CursesDialog/CMakeLists.txt) + add_subdirectory(CursesDialog) endif() # Qt GUI diff --git a/Source/CursesDialog/CMakeLists.txt b/Source/CursesDialog/CMakeLists.txt index 270b07e..7009717 100644 --- a/Source/CursesDialog/CMakeLists.txt +++ b/Source/CursesDialog/CMakeLists.txt @@ -1,26 +1,22 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -set( CURSES_SRCS - CursesDialog/cmCursesOptionsWidget.cxx - CursesDialog/cmCursesBoolWidget.cxx - CursesDialog/cmCursesCacheEntryComposite.cxx - CursesDialog/cmCursesDummyWidget.cxx - CursesDialog/cmCursesFilePathWidget.cxx - CursesDialog/cmCursesForm.cxx - CursesDialog/cmCursesLabelWidget.cxx - CursesDialog/cmCursesLongMessageForm.cxx - CursesDialog/cmCursesMainForm.cxx - CursesDialog/cmCursesPathWidget.cxx - CursesDialog/cmCursesStringWidget.cxx - CursesDialog/cmCursesWidget.cxx - CursesDialog/ccmake.cxx - ) - -include_directories(${CURSES_INCLUDE_PATH}) - - -add_executable(ccmake ${CURSES_SRCS} ) +add_executable(ccmake + ccmake.cxx + cmCursesBoolWidget.cxx + cmCursesCacheEntryComposite.cxx + cmCursesDummyWidget.cxx + cmCursesFilePathWidget.cxx + cmCursesForm.cxx + cmCursesLabelWidget.cxx + cmCursesLongMessageForm.cxx + cmCursesMainForm.cxx + cmCursesOptionsWidget.cxx + cmCursesPathWidget.cxx + cmCursesStringWidget.cxx + cmCursesWidget.cxx + ) +target_include_directories(ccmake PRIVATE ${CURSES_INCLUDE_PATH}) target_link_libraries(ccmake CMakeLib) if(CMAKE_USE_SYSTEM_FORM) find_path(CURSES_FORM_INCLUDE_DIR NAMES form.h HINTS ${CURSES_INCLUDE_PATH} ${CURSES_INCLUDE_PATH}/ncurses) -- cgit v0.12