lnav/CMakeLists.txt

60 lines
1.4 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.14)
include(cmake/prelude.cmake)
set(CMAKE_CXX_STANDARD 17)
project(
lnav
VERSION 0.12.3
DESCRIPTION "An advanced log file viewer for the terminal."
HOMEPAGE_URL "https://lnav.org/"
LANGUAGES CXX C
)
include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)
2024-05-11 04:01:25 +00:00
set(CURSES_NEED_NCURSES TRUE)
find_package(PkgConfig REQUIRED)
find_package(unofficial-sqlite3 CONFIG REQUIRED)
find_package(BZip2 REQUIRED)
find_package(LibArchive REQUIRED)
find_package(ZLIB REQUIRED)
2024-05-11 04:01:25 +00:00
find_package(pcre2 CONFIG REQUIRED)
pkg_check_modules(readline REQUIRED IMPORTED_TARGET readline)
find_package(Curses REQUIRED)
find_package(CURL REQUIRED)
set(lnav_LIBS
CURL::libcurl
2024-05-11 04:01:25 +00:00
unofficial::sqlite3::sqlite3
BZip2::BZip2
2024-05-11 04:01:25 +00:00
${CURSES_LIBRARIES}
PCRE2::8BIT PCRE2::16BIT PCRE2::32BIT PCRE2::POSIX
PkgConfig::readline
LibArchive::LibArchive
ZLIB::ZLIB
2023-09-05 03:39:49 +00:00
)
2014-09-19 04:51:01 +00:00
add_subdirectory(src)
2022-03-16 22:38:08 +00:00
# add_subdirectory(test)
# ---- Install rules ----
if (NOT CMAKE_SKIP_INSTALL_RULES)
include(cmake/install-rules.cmake)
endif ()
# ---- Developer mode ----
if (NOT lnav_DEVELOPER_MODE)
return()
elseif (NOT PROJECT_IS_TOP_LEVEL)
message(
AUTHOR_WARNING
"Developer mode is intended for developers of lnav"
)
endif ()
include(cmake/dev-mode.cmake)