summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 02347030777d1be8f7aea8e5a8def3dadbf92ed2 (plain)
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 14)
project(
        lnav
        VERSION 0.11.2
        DESCRIPTION "An advanced log file viewer for the small-scale."
        HOMEPAGE_URL "https://lnav.org/"
        LANGUAGES CXX C
)

include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)

find_package(SQLite3 REQUIRED)
find_package(BZip2 REQUIRED)
find_package(LibArchive REQUIRED)
find_package(ZLIB REQUIRED)
find_package(pcre REQUIRED)
find_package(pcre2 REQUIRED)
find_package(readline REQUIRED)
find_package(ncurses REQUIRED)
find_package(CURL REQUIRED)

set(lnav_LIBS
        CURL::libcurl
        SQLite::SQLite3
        BZip2::BZip2
        ncurses::libcurses
        pcre::libpcre
        pcre2::pcre2
        readline::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)