aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2016-07-24 00:27:25 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2016-07-24 00:27:25 +0200
commit9b7c801c370b69bec13b7d737212cab3d70b0f11 (patch)
tree7990ea6ea35a13b688e95483c1a7e121790a3993 /CMakeLists.txt
parent1f2a32ed97cdfe6a389dda5f386cc501e0cf97a1 (diff)
downloadtermo-9b7c801c370b69bec13b7d737212cab3d70b0f11.tar.gz
termo-9b7c801c370b69bec13b7d737212cab3d70b0f11.tar.xz
termo-9b7c801c370b69bec13b7d737212cab3d70b0f11.zip
Make unibilium work at all
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 12 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 17c6cda..9975813 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,16 +48,22 @@ set (lib_headers
${PROJECT_BINARY_DIR}/termo-config.h)
# Project libraries
+# We need ncurses for one of the demos, so we're always looking
+if (NCURSESW_FOUND)
+ include_directories (${NCURSESW_INCLUDE_DIRS})
+ set (curses_libraries ${NCURSESW_LIBRARIES})
+elseif (CURSES_FOUND)
+ include_directories (${CURSES_INCLUDE_DIR})
+ set (curses_libraries ${CURSES_LIBRARY})
+endif (NCURSESW_FOUND)
+
if (unibilium_FOUND)
include_directories (${unibilium_INCLUDE_DIRS})
set (lib_libraries ${unibilium_LIBRARIES})
add_definitions (-DHAVE_UNIBILIUM)
-elseif (NCURSESW_FOUND)
+elseif (curses_libraries)
include_directories (${NCURSESW_INCLUDE_DIRS})
- set (lib_libraries ${NCURSESW_LIBRARIES})
-elseif (CURSES_FOUND)
- include_directories (${CURSES_INCLUDE_DIR})
- set (lib_libraries ${CURSES_LIBRARY})
+ set (lib_libraries ${curses_libraries})
else (CURSES_FOUND)
message (SEND_ERROR "Unibilium not found, Curses not found")
endif (unibilium_FOUND)
@@ -90,7 +96,7 @@ add_executable (demo-async EXCLUDE_FROM_ALL demo-async.c)
target_link_libraries (demo-async termo-static ${lib_libraries})
add_executable (demo-draw EXCLUDE_FROM_ALL demo-draw.c)
-target_link_libraries (demo-draw termo-static ${lib_libraries})
+target_link_libraries (demo-draw termo-static ${lib_libraries} ${curses_libraries})
add_executable (demo EXCLUDE_FROM_ALL demo.c)
target_link_libraries (demo termo-static ${lib_libraries})