degesch: fix README by fixing CMakeLists.txt
This commit is contained in:
parent
a5a1079a9c
commit
1acd41eafe
|
@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 2.8.5)
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
option (WANT_READLINE "Use GNU Readline for the UI (better)" ON)
|
option (WANT_READLINE "Use GNU Readline for the UI (better)" ON)
|
||||||
option (WANT_EDITLINE "Use BSD libedit for the UI" OFF)
|
option (WANT_LIBEDIT "Use BSD libedit for the UI" OFF)
|
||||||
|
|
||||||
# Moar warnings
|
# Moar warnings
|
||||||
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUC)
|
if ("${CMAKE_C_COMPILER_ID}" MATCHES "GNU" OR CMAKE_COMPILER_IS_GNUC)
|
||||||
|
@ -42,24 +42,24 @@ else (CURSES_FOUND)
|
||||||
message (SEND_ERROR "Curses not found")
|
message (SEND_ERROR "Curses not found")
|
||||||
endif (ncursesw_FOUND)
|
endif (ncursesw_FOUND)
|
||||||
|
|
||||||
if ((WANT_READLINE AND WANT_EDITLINE) OR (NOT WANT_READLINE AND NOT WANT_EDITLINE))
|
if ((WANT_READLINE AND WANT_LIBEDIT) OR (NOT WANT_READLINE AND NOT WANT_LIBEDIT))
|
||||||
message (SEND_ERROR "You have to choose either GNU Readline or libedit")
|
message (SEND_ERROR "You have to choose either GNU Readline or libedit")
|
||||||
elseif (WANT_READLINE)
|
elseif (WANT_READLINE)
|
||||||
list (APPEND project_libraries readline)
|
list (APPEND project_libraries readline)
|
||||||
elseif (WANT_EDITLINE)
|
elseif (WANT_LIBEDIT)
|
||||||
pkg_check_modules (libedit REQUIRED libedit)
|
pkg_check_modules (libedit REQUIRED libedit)
|
||||||
list (APPEND project_libraries ${libedit_LIBRARIES})
|
list (APPEND project_libraries ${libedit_LIBRARIES})
|
||||||
include_directories (${libedit_INCLUDE_DIRS})
|
include_directories (${libedit_INCLUDE_DIRS})
|
||||||
endif ((WANT_READLINE AND WANT_EDITLINE) OR (NOT WANT_READLINE AND NOT WANT_EDITLINE))
|
endif ((WANT_READLINE AND WANT_LIBEDIT) OR (NOT WANT_READLINE AND NOT WANT_LIBEDIT))
|
||||||
|
|
||||||
# Generate a configuration file
|
# Generate a configuration file
|
||||||
if (WANT_READLINE)
|
if (WANT_READLINE)
|
||||||
set (HAVE_READLINE 1)
|
set (HAVE_READLINE 1)
|
||||||
endif (WANT_READLINE)
|
endif (WANT_READLINE)
|
||||||
|
|
||||||
if (WANT_EDITLINE)
|
if (WANT_LIBEDIT)
|
||||||
set (HAVE_EDITLINE 1)
|
set (HAVE_EDITLINE 1)
|
||||||
endif (WANT_EDITLINE)
|
endif (WANT_LIBEDIT)
|
||||||
|
|
||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
set (plugin_dir ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME})
|
set (plugin_dir ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME})
|
||||||
|
|
Loading…
Reference in New Issue