From 74965b0f66f1907346df49c1eebb07169d26129d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C5=99emysl=20Janouch?=
Date: Tue, 28 Oct 2014 02:39:37 +0100
Subject: Rewrite to use libev
libuv is too immature so far and I'm not in the mood to try and
link it statically via some horrible hack (no CMake support).
Also libev is much closer to my understanding of event loops.
The messaging model stays for when/if I want to return to libuv.
---
CMakeLists.txt | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
(limited to 'CMakeLists.txt')
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 88a01c8..ca80edf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,9 +20,13 @@ set (project_VERSION "${project_VERSION_MAJOR}")
set (project_VERSION "${project_VERSION}.${project_VERSION_MINOR}")
set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}")
+# For custom modules
+set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+
# Dependencies
find_package (PkgConfig REQUIRED)
-pkg_check_modules (dependencies REQUIRED ncursesw libuv>=0.11)
+pkg_check_modules (ncursesw REQUIRED ncursesw)
+find_package (LibEV REQUIRED)
if (USE_SYSTEM_TERMO)
find_package (Termo REQUIRED)
@@ -38,11 +42,12 @@ else (USE_SYSTEM_TERMO)
set (Termo_LIBRARIES termo-static)
endif (USE_SYSTEM_TERMO)
-include_directories (${dependencies_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS})
+include_directories (${ncursesw_INCLUDE_DIRS}
+ ${LIBEV_INCLUDE_DIRS} ${Termo_INCLUDE_DIRS})
# Configuration
include (CheckFunctionExists)
-set (CMAKE_REQUIRED_LIBRARIES ${dependencies_LIBRARIES})
+set (CMAKE_REQUIRED_LIBRARIES ${ncursesw_LIBRARIES})
CHECK_FUNCTION_EXISTS ("resizeterm" HAVE_RESIZETERM)
# Project source files
@@ -50,7 +55,7 @@ set (project_sources ${PROJECT_NAME}.c)
set (project_headers ${PROJECT_BINARY_DIR}/config.h)
# Project libraries
-set (project_libraries ${dependencies_LIBRARIES} termo-static)
+set (project_libraries ${ncursesw_LIBRARIES} ${LIBEV_LIBRARIES} termo-static)
# Generate a configuration file
configure_file (${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h)
--
cgit v1.2.3