aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2014-10-28 02:39:37 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2014-10-28 02:39:37 +0100
commit74965b0f66f1907346df49c1eebb07169d26129d (patch)
treecab8e1e5745db920685b3ff28f112d89971c0821 /CMakeLists.txt
parent606c5f43af3b9b7a5f1484540e7455346bba31c9 (diff)
downloadneetdraw-74965b0f66f1907346df49c1eebb07169d26129d.tar.gz
neetdraw-74965b0f66f1907346df49c1eebb07169d26129d.tar.xz
neetdraw-74965b0f66f1907346df49c1eebb07169d26129d.zip
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 9 insertions, 4 deletions
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)