mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-15 03:48:02 +08:00
ccmake: Fix form.h include with CMAKE_USE_SYSTEM_FORM
Some distributions have form.h in ncurses/ next to the ncurses.h found by FindCurses. Fixes: #19589
This commit is contained in:

committed by
Brad King

parent
70c56b856c
commit
66654135c1
@@ -23,6 +23,10 @@ include_directories(${CURSES_INCLUDE_PATH})
|
|||||||
add_executable(ccmake ${CURSES_SRCS} )
|
add_executable(ccmake ${CURSES_SRCS} )
|
||||||
target_link_libraries(ccmake CMakeLib)
|
target_link_libraries(ccmake CMakeLib)
|
||||||
if(CMAKE_USE_SYSTEM_FORM)
|
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
|
target_link_libraries(ccmake
|
||||||
${CURSES_FORM_LIBRARY}
|
${CURSES_FORM_LIBRARY}
|
||||||
${CURSES_LIBRARY}
|
${CURSES_LIBRARY}
|
||||||
|
Reference in New Issue
Block a user