summaryrefslogtreecommitdiffstats
path: root/Source/CursesDialog/CMakeLists.txt
blob: 270b07e82b16f904cd487158b74c5ee46fbd0952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# 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} )
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)
  if(CURSES_FORM_INCLUDE_DIR)
    target_include_directories(ccmake PRIVATE ${CURSES_FORM_INCLUDE_DIR})
  endif()
  target_link_libraries(ccmake
    ${CURSES_FORM_LIBRARY}
    ${CURSES_LIBRARY}
  )
  if(CURSES_EXTRA_LIBRARY)
    target_link_libraries(ccmake ${CURSES_EXTRA_LIBRARY})
  endif()
else()
  target_link_libraries(ccmake cmForm)
endif()

CMake_OPTIONAL_COMPONENT(ccmake)
install(TARGETS ccmake DESTINATION ${CMAKE_BIN_DIR} ${COMPONENT})