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