Only compile curses renderer if curses was found.

This commit is contained in:
Jari Vetoniemi 2014-10-23 02:10:22 +03:00
parent df396986b1
commit 6ebdb0030a

View File

@ -1,6 +1,10 @@
SET(CURSES_NEED_NCURSES TRUE)
FIND_PACKAGE(Curses)
ADD_LIBRARY(bemenu-renderer-curses SHARED curses.c)
SET_TARGET_PROPERTIES(bemenu-renderer-curses PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(bemenu-renderer-curses ${CURSES_LIBRARY})
INSTALL(TARGETS bemenu-renderer-curses DESTINATION lib/bemenu)
if (CURSES_FOUND)
INCLUDE_DIRECTORIES(${CURSES_INCLUDE_DIRS})
ADD_LIBRARY(bemenu-renderer-curses SHARED curses.c)
SET_TARGET_PROPERTIES(bemenu-renderer-curses PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(bemenu-renderer-curses ${CURSES_LIBRARY})
INSTALL(TARGETS bemenu-renderer-curses DESTINATION lib/bemenu)
endif ()