2022-03-14 05:44:12 +00:00
|
|
|
cmake_minimum_required(VERSION 3.14)
|
2019-06-27 04:52:40 +00:00
|
|
|
|
2022-03-14 05:44:12 +00:00
|
|
|
include(cmake/prelude.cmake)
|
2019-07-09 15:34:55 +00:00
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
2022-03-14 05:44:12 +00:00
|
|
|
project(
|
2022-04-01 06:21:59 +00:00
|
|
|
lnav
|
2023-06-10 04:13:39 +00:00
|
|
|
VERSION 0.11.2
|
2022-04-01 06:21:59 +00:00
|
|
|
DESCRIPTION "An advanced log file viewer for the small-scale."
|
|
|
|
HOMEPAGE_URL "https://lnav.org/"
|
|
|
|
LANGUAGES CXX C
|
2022-03-14 05:44:12 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
include(cmake/project-is-top-level.cmake)
|
|
|
|
include(cmake/variables.cmake)
|
|
|
|
|
|
|
|
find_package(SQLite3 REQUIRED)
|
|
|
|
find_package(BZip2 REQUIRED)
|
|
|
|
find_package(LibArchive REQUIRED)
|
2019-07-09 15:34:55 +00:00
|
|
|
find_package(ZLIB REQUIRED)
|
2022-03-14 05:44:12 +00:00
|
|
|
find_package(pcre REQUIRED)
|
2022-09-10 16:28:07 +00:00
|
|
|
find_package(pcre2 REQUIRED)
|
2019-07-09 15:34:55 +00:00
|
|
|
find_package(readline REQUIRED)
|
2022-03-14 05:44:12 +00:00
|
|
|
find_package(ncurses REQUIRED)
|
|
|
|
find_package(CURL REQUIRED)
|
2021-01-29 19:12:02 +00:00
|
|
|
|
2019-06-27 04:52:40 +00:00
|
|
|
set(lnav_LIBS
|
2022-03-14 05:44:12 +00:00
|
|
|
CURL::libcurl
|
|
|
|
SQLite::SQLite3
|
|
|
|
BZip2::BZip2
|
|
|
|
ncurses::libcurses
|
|
|
|
pcre::libpcre
|
2022-09-10 16:28:07 +00:00
|
|
|
pcre2::pcre2
|
2022-03-14 05:44:12 +00:00
|
|
|
readline::readline
|
|
|
|
LibArchive::LibArchive
|
|
|
|
ZLIB::ZLIB
|
|
|
|
)
|
2019-06-27 04:52:40 +00:00
|
|
|
|
2014-09-19 04:51:01 +00:00
|
|
|
add_subdirectory(src)
|
2022-03-16 22:38:08 +00:00
|
|
|
# add_subdirectory(test)
|
2022-03-14 05:44:12 +00:00
|
|
|
|
|
|
|
# ---- Install rules ----
|
|
|
|
|
2022-09-10 16:28:07 +00:00
|
|
|
if (NOT CMAKE_SKIP_INSTALL_RULES)
|
|
|
|
include(cmake/install-rules.cmake)
|
|
|
|
endif ()
|
2022-03-14 05:44:12 +00:00
|
|
|
|
|
|
|
# ---- Developer mode ----
|
|
|
|
|
2022-09-10 16:28:07 +00: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 05:44:12 +00:00
|
|
|
|
|
|
|
include(cmake/dev-mode.cmake)
|