Skip to content

Commit

Permalink
Make tic/terminfo optional
Browse files Browse the repository at this point in the history
  • Loading branch information
dextercd committed Dec 2, 2022
1 parent 8a06ccc commit 17dde82
Showing 1 changed file with 19 additions and 12 deletions.
31 changes: 19 additions & 12 deletions terminfo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
add_custom_command(
OUTPUT
k/katerm-color
DEPENDS
term.info
COMMAND
tic -sx ${CMAKE_CURRENT_SOURCE_DIR}/term.info
-o ${CMAKE_CURRENT_BINARY_DIR}
)
find_program(TIC_PROGRAM tic)

add_custom_target(terminfo ALL
DEPENDS
k/katerm-color)
if (NOT TIC_PROGRAM)
message(WARNING "tic program not found, won't build terminfo file")
else()
add_custom_command(
OUTPUT
k/katerm-color
DEPENDS
term.info
COMMAND
tic -sx ${CMAKE_CURRENT_SOURCE_DIR}/term.info
-o ${CMAKE_CURRENT_BINARY_DIR}
)

add_custom_target(terminfo ALL
DEPENDS
k/katerm-color
)
endif()

0 comments on commit 17dde82

Please sign in to comment.