2014-09-19 04:51:01 +00:00
|
|
|
|
2019-07-09 15:34:55 +00:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
2019-06-27 04:52:40 +00:00
|
|
|
|
2020-09-24 23:09:28 +00:00
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif()
|
|
|
|
|
2021-01-17 06:23:20 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter")
|
2020-09-24 23:09:28 +00:00
|
|
|
set(CMAKE_CXX_FLAGS_DEBUG "-g")
|
|
|
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
|
|
|
|
2019-07-09 15:34:55 +00:00
|
|
|
include("cmake/HunterGate.cmake")
|
|
|
|
HunterGate(
|
2021-03-23 16:35:02 +00:00
|
|
|
URL "https://github.com/cpp-pm/hunter/archive/v0.23.296.tar.gz"
|
|
|
|
SHA1 "232f5022ee1d45955a7e8d3e1720f31bac1bb534"
|
2020-09-24 23:02:14 +00:00
|
|
|
LOCAL
|
2019-07-09 15:34:55 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
set(CMAKE_CXX_STANDARD 14)
|
|
|
|
project(lnav
|
2021-06-11 06:01:05 +00:00
|
|
|
VERSION 0.10.0)
|
2019-07-09 15:34:55 +00:00
|
|
|
|
2021-01-29 19:12:02 +00:00
|
|
|
# include(cmake/CodeCoverage.cmake)
|
|
|
|
# append_coverage_compiler_flags()
|
|
|
|
|
2019-07-09 15:34:55 +00:00
|
|
|
include(CTest)
|
2019-07-22 17:36:47 +00:00
|
|
|
include(GNUInstallDirs)
|
2019-07-09 15:34:55 +00:00
|
|
|
|
|
|
|
hunter_add_package(libpcre)
|
|
|
|
find_package(libpcre CONFIG REQUIRED)
|
|
|
|
|
|
|
|
hunter_add_package(BZip2)
|
|
|
|
find_package(BZip2 CONFIG REQUIRED)
|
|
|
|
|
|
|
|
hunter_add_package(sqlite3)
|
|
|
|
find_package(sqlite3 CONFIG REQUIRED)
|
|
|
|
|
|
|
|
hunter_add_package(ZLIB)
|
|
|
|
find_package(ZLIB REQUIRED)
|
|
|
|
|
|
|
|
hunter_add_package(CURL)
|
|
|
|
find_package(CURL CONFIG REQUIRED)
|
|
|
|
|
|
|
|
hunter_add_package(ncursesw)
|
|
|
|
find_package(ncursesw CONFIG REQUIRED)
|
|
|
|
|
|
|
|
hunter_add_package(readline)
|
|
|
|
find_package(readline REQUIRED)
|
2019-06-27 04:52:40 +00:00
|
|
|
|
2021-01-29 19:12:02 +00:00
|
|
|
hunter_add_package(libarchive)
|
|
|
|
find_package(libarchive CONFIG REQUIRED)
|
|
|
|
|
2019-06-27 04:52:40 +00:00
|
|
|
set(lnav_LIBS
|
2019-07-09 15:34:55 +00:00
|
|
|
ZLIB::zlib
|
|
|
|
BZip2::bz2
|
|
|
|
sqlite3::sqlite3
|
2019-07-16 06:04:31 +00:00
|
|
|
PkgConfig::libpcre
|
2019-07-09 15:34:55 +00:00
|
|
|
CURL::libcurl
|
|
|
|
readline::readline
|
|
|
|
readline::history
|
2021-01-29 19:12:02 +00:00
|
|
|
PkgConfig::ncursesw
|
|
|
|
PkgConfig::libarchive)
|
2019-06-27 04:52:40 +00:00
|
|
|
|
2014-09-19 04:51:01 +00:00
|
|
|
add_subdirectory(src)
|
2014-09-29 05:36:07 +00:00
|
|
|
add_subdirectory(test)
|