-
-
Notifications
You must be signed in to change notification settings - Fork 323
/
CMakeLists.txt
59 lines (48 loc) · 1.35 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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)
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)
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
unofficial::sqlite3::sqlite3
BZip2::BZip2
${CURSES_LIBRARIES}
PCRE2::8BIT PCRE2::16BIT PCRE2::32BIT PCRE2::POSIX
PkgConfig::readline
LibArchive::LibArchive
ZLIB::ZLIB
)
add_subdirectory(src)
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)