Also build with ncursesw only
This commit is contained in:
parent
855d02acab
commit
fc197b12cf
|
@ -23,7 +23,7 @@ before_install:
|
||||||
- sudo add-apt-repository ppa:ukplc-team/ppa -y
|
- sudo add-apt-repository ppa:ukplc-team/ppa -y
|
||||||
- sudo apt-get update -qq
|
- sudo apt-get update -qq
|
||||||
install:
|
install:
|
||||||
- sudo apt-get install -y libcurl4-openssl-dev libjansson-dev libev-dev libreadline-dev
|
- sudo apt-get install -y libcurl4-openssl-dev libjansson-dev libev-dev libreadline-dev libncursesw5-dev
|
||||||
before_script:
|
before_script:
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
|
|
|
@ -20,13 +20,24 @@ set (project_VERSION "${project_VERSION}.${project_VERSION_PATCH}")
|
||||||
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
find_package (Curses REQUIRED)
|
find_package (Curses)
|
||||||
find_package (PkgConfig REQUIRED)
|
find_package (PkgConfig REQUIRED)
|
||||||
pkg_check_modules (dependencies REQUIRED libcurl jansson)
|
pkg_check_modules (dependencies REQUIRED libcurl jansson)
|
||||||
find_package (LibEV REQUIRED)
|
find_package (LibEV REQUIRED)
|
||||||
|
pkg_check_modules (ncursesw ncursesw)
|
||||||
|
|
||||||
include_directories (${CURSES_INCLUDE_DIR}
|
set (project_libraries ${dependencies_LIBRARIES} ${LIBEV_LIBRARIES} readline)
|
||||||
${dependencies_INCLUDE_DIRS} ${LIBEV_INCLUDE_DIRS})
|
include_directories (${dependencies_INCLUDE_DIRS} ${LIBEV_INCLUDE_DIRS})
|
||||||
|
|
||||||
|
if (ncursesw_FOUND)
|
||||||
|
list (APPEND project_libraries ${ncursesw_LIBRARIES})
|
||||||
|
include_directories (${ncursesw_INCLUDE_DIRS})
|
||||||
|
elseif (CURSES_FOUND)
|
||||||
|
list (APPEND project_libraries ${CURSES_LIBRARY})
|
||||||
|
include_directories (${CURSES_INCLUDE_DIR})
|
||||||
|
else (CURSES_FOUND)
|
||||||
|
message (SEND_ERROR "Curses not found")
|
||||||
|
endif (ncursesw_FOUND)
|
||||||
|
|
||||||
# Generate a configuration file
|
# Generate a configuration file
|
||||||
configure_file (${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h)
|
configure_file (${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_BINARY_DIR}/config.h)
|
||||||
|
@ -34,8 +45,7 @@ include_directories (${PROJECT_BINARY_DIR})
|
||||||
|
|
||||||
# Build the main executable and link it
|
# Build the main executable and link it
|
||||||
add_executable (${PROJECT_NAME} ${PROJECT_NAME}.c siphash.c)
|
add_executable (${PROJECT_NAME} ${PROJECT_NAME}.c siphash.c)
|
||||||
target_link_libraries (${PROJECT_NAME} ${CURSES_LIBRARY}
|
target_link_libraries (${PROJECT_NAME} ${project_libraries})
|
||||||
${dependencies_LIBRARIES} ${LIBEV_LIBRARIES} readline)
|
|
||||||
|
|
||||||
# The files to be installed
|
# The files to be installed
|
||||||
include (GNUInstallDirs)
|
include (GNUInstallDirs)
|
||||||
|
|
Loading…
Reference in New Issue