[build] try to use vcpkg

pull/1265/head
Tim Stack 3 weeks ago
parent 2ed19ec00c
commit 3b4db06f40

@ -14,24 +14,24 @@ project(
include(cmake/project-is-top-level.cmake)
include(cmake/variables.cmake)
find_package(SQLite3 REQUIRED)
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(pcre REQUIRED)
find_package(pcre2 REQUIRED)
find_package(readline REQUIRED)
find_package(ncurses 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
SQLite::SQLite3
unofficial::sqlite3::sqlite3
BZip2::BZip2
ncurses::libcurses
pcre::libpcre
pcre2::pcre2
readline::readline
${CURSES_LIBRARIES}
PCRE2::8BIT PCRE2::16BIT PCRE2::32BIT PCRE2::POSIX
PkgConfig::readline
LibArchive::LibArchive
ZLIB::ZLIB
)

@ -1,142 +1,13 @@
{
"version": 2,
"cmakeMinimumRequired": {
"major": 3,
"minor": 14,
"patch": 0
},
"configurePresets": [
{
"name": "cmake-pedantic",
"hidden": true,
"warnings": {
"dev": true,
"deprecated": true,
"uninitialized": true,
"unusedCli": true,
"systemVars": false
},
"errors": {
"dev": true,
"deprecated": true
}
},
{
"name": "dev-mode",
"hidden": true,
"inherits": "cmake-pedantic",
"cacheVariables": {
"lnav_DEVELOPER_MODE": "ON"
}
},
{
"name": "conan",
"hidden": true,
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/conan/conan_toolchain.cmake"
}
},
{
"name": "cppcheck",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_CPPCHECK": "cppcheck;--inline-suppr"
}
},
{
"name": "clang-tidy",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_CLANG_TIDY": "clang-tidy;--header-filter=${sourceDir}/*"
}
},
{
"name": "ci-std",
"description": "This preset makes sure the project actually builds with at least the specified standard",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_EXTENSIONS": "OFF",
"CMAKE_CXX_STANDARD": "14",
"CMAKE_CXX_STANDARD_REQUIRED": "ON"
}
},
{
"name": "flags-unix",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": ""
}
},
{
"name": "flags-windows",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": "/W4 /permissive- /utf-8 /volatile:iso /EHsc /Zc:__cplusplus /Zc:throwingNew"
}
},
{
"name": "ci-unix",
"generator": "Unix Makefiles",
"hidden": true,
"inherits": ["flags-unix", "ci-std"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "ci-win64",
"inherits": ["flags-windows", "ci-std"],
"generator": "Visual Studio 17 2022",
"architecture": "x64",
"hidden": true
},
{
"name": "coverage-unix",
"binaryDir": "${sourceDir}/build/coverage",
"inherits": "ci-unix",
"hidden": true,
"cacheVariables": {
"ENABLE_COVERAGE": "ON",
"CMAKE_BUILD_TYPE": "Coverage",
"CMAKE_CXX_FLAGS_COVERAGE": "-Og -g --coverage -fkeep-inline-functions -fkeep-static-functions",
"CMAKE_EXE_LINKER_FLAGS_COVERAGE": "--coverage",
"CMAKE_SHARED_LINKER_FLAGS_COVERAGE": "--coverage",
"CMAKE_MAP_IMPORTED_CONFIG_SANITIZE": "Coverage;RelWithDebInfo;Release;Debug;"
}
},
{
"name": "ci-coverage",
"inherits": ["coverage-unix", "dev-mode", "conan"],
"cacheVariables": {
"COVERAGE_HTML_COMMAND": ""
}
},
{
"name": "ci-sanitize",
"binaryDir": "${sourceDir}/build/sanitize",
"inherits": ["ci-unix", "dev-mode", "conan"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Sanitize",
"CMAKE_CXX_FLAGS_SANITIZE": "-O2 -g -fsanitize=address,undefined -fno-omit-frame-pointer -fno-common",
"CMAKE_MAP_IMPORTED_CONFIG_SANITIZE": "Sanitize;RelWithDebInfo;Release;Debug;"
}
},
{
"name": "ci-build",
"binaryDir": "${sourceDir}/build",
"hidden": true
},
{
"name": "ci-macos",
"inherits": ["ci-build", "ci-unix", "dev-mode", "conan"]
},
{
"name": "ci-ubuntu",
"inherits": ["ci-build", "ci-unix", "clang-tidy", "conan", "dev-mode"]
},
{
"name": "ci-windows",
"inherits": ["ci-build", "ci-win64", "dev-mode", "conan"]
}
]
}
"version": 2,
"configurePresets": [
{
"name": "default",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "$env{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
}
}
]
}

@ -1,112 +0,0 @@
cmake_minimum_required(VERSION 3.14)
foreach(var IN ITEMS PROJECT_BINARY_DIR PROJECT_SOURCE_DIR)
if(NOT DEFINED "${var}")
message(FATAL_ERROR "${var} must be defined")
endif()
endforeach()
set(bin "${PROJECT_BINARY_DIR}")
set(src "${PROJECT_SOURCE_DIR}")
# ---- Dependencies ----
set(mcss_SOURCE_DIR "${bin}/docs/.ci")
if(NOT IS_DIRECTORY "${mcss_SOURCE_DIR}")
file(MAKE_DIRECTORY "${mcss_SOURCE_DIR}")
file(
DOWNLOAD
https://github.com/friendlyanon/m.css/releases/download/release-1/mcss.zip
"${mcss_SOURCE_DIR}/mcss.zip"
STATUS status
EXPECTED_MD5 00cd2757ebafb9bcba7f5d399b3bec7f
)
if(NOT status MATCHES "^0;")
message(FATAL_ERROR "Download failed with ${status}")
endif()
execute_process(
COMMAND "${CMAKE_COMMAND}" -E tar xf mcss.zip
WORKING_DIRECTORY "${mcss_SOURCE_DIR}"
RESULT_VARIABLE result
)
if(NOT result EQUAL "0")
message(FATAL_ERROR "Extraction failed with ${result}")
endif()
file(REMOVE "${mcss_SOURCE_DIR}/mcss.zip")
endif()
find_program(Python3_EXECUTABLE NAMES python3 python)
if(NOT Python3_EXECUTABLE)
message(FATAL_ERROR "Python executable was not found")
endif()
# ---- Process project() call in CMakeLists.txt ----
file(READ "${src}/CMakeLists.txt" content)
string(FIND "${content}" "project(" index)
if(index EQUAL "-1")
message(FATAL_ERROR "Could not find \"project(\"")
endif()
string(SUBSTRING "${content}" "${index}" -1 content)
string(FIND "${content}" "\n)\n" index)
if(index EQUAL "-1")
message(FATAL_ERROR "Could not find \"\\n)\\n\"")
endif()
string(SUBSTRING "${content}" 0 "${index}" content)
file(WRITE "${bin}/docs-ci.project.cmake" "docs_${content}\n)\n")
macro(list_pop_front list out)
list(GET "${list}" 0 "${out}")
list(REMOVE_AT "${list}" 0)
endmacro()
function(docs_project name)
cmake_parse_arguments(PARSE_ARGV 1 "" "" "VERSION;DESCRIPTION;HOMEPAGE_URL" LANGUAGES)
set(PROJECT_NAME "${name}" PARENT_SCOPE)
if(DEFINED _VERSION)
set(PROJECT_VERSION "${_VERSION}" PARENT_SCOPE)
string(REGEX MATCH "^[0-9]+(\\.[0-9]+)*" versions "${_VERSION}")
string(REPLACE . ";" versions "${versions}")
set(suffixes MAJOR MINOR PATCH TWEAK)
while(NOT versions STREQUAL "" AND NOT suffixes STREQUAL "")
list_pop_front(versions version)
list_pop_front(suffixes suffix)
set("PROJECT_VERSION_${suffix}" "${version}" PARENT_SCOPE)
endwhile()
endif()
if(DEFINED _DESCRIPTION)
set(PROJECT_DESCRIPTION "${_DESCRIPTION}" PARENT_SCOPE)
endif()
if(DEFINED _HOMEPAGE_URL)
set(PROJECT_HOMEPAGE_URL "${_HOMEPAGE_URL}" PARENT_SCOPE)
endif()
endfunction()
include("${bin}/docs-ci.project.cmake")
# ---- Generate docs ----
if(NOT DEFINED DOXYGEN_OUTPUT_DIRECTORY)
set(DOXYGEN_OUTPUT_DIRECTORY "${bin}/docs")
endif()
set(out "${DOXYGEN_OUTPUT_DIRECTORY}")
foreach(file IN ITEMS Doxyfile conf.py)
configure_file("${src}/docs/${file}.in" "${bin}/docs/${file}" @ONLY)
endforeach()
set(mcss_script "${mcss_SOURCE_DIR}/documentation/doxygen.py")
set(config "${bin}/docs/conf.py")
file(REMOVE_RECURSE "${out}/html" "${out}/xml")
execute_process(
COMMAND "${Python3_EXECUTABLE}" "${mcss_script}" "${config}"
WORKING_DIRECTORY "${bin}/docs"
RESULT_VARIABLE result
)
if(NOT result EQUAL "0")
message(FATAL_ERROR "m.css returned with ${result}")
endif()

@ -1,46 +0,0 @@
# ---- Dependencies ----
set(extract_timestamps "")
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24")
set(extract_timestamps DOWNLOAD_EXTRACT_TIMESTAMP YES)
endif ()
include(FetchContent)
FetchContent_Declare(
mcss URL
https://github.com/friendlyanon/m.css/releases/download/release-1/mcss.zip
URL_MD5 00cd2757ebafb9bcba7f5d399b3bec7f
SOURCE_DIR "${PROJECT_BINARY_DIR}/mcss"
UPDATE_DISCONNECTED YES
${extract_timestamps}
)
FetchContent_MakeAvailable(mcss)
find_package(Python3 3.6 REQUIRED)
# ---- Declare documentation target ----
set(
DOXYGEN_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/docs"
CACHE PATH "Path for the generated Doxygen documentation"
)
set(working_dir "${PROJECT_BINARY_DIR}/docs")
foreach (file IN ITEMS Doxyfile conf.py)
configure_file("docs/${file}.in" "${working_dir}/${file}" @ONLY)
endforeach ()
set(mcss_script "${mcss_SOURCE_DIR}/documentation/doxygen.py")
set(config "${working_dir}/conf.py")
add_custom_target(
docs
COMMAND "${CMAKE_COMMAND}" -E remove_directory
"${DOXYGEN_OUTPUT_DIRECTORY}/html"
"${DOXYGEN_OUTPUT_DIRECTORY}/xml"
COMMAND "${Python3_EXECUTABLE}" "${mcss_script}" "${config}"
COMMENT "Building documentation using Doxygen and m.css"
WORKING_DIRECTORY "${working_dir}"
VERBATIM
)

@ -1,58 +0,0 @@
from conans import ConanFile
from conan.tools.cmake import CMake, CMakeToolchain, CMakeDeps
class LnavConan(ConanFile):
name = "lnav"
version = "0.12.1"
homepage = "https://lnav.org"
url = "https://github.com/tstack/lnav.git"
license = "BSD-2-Clause"
description = (
"The Log File Navigator, lnav for short, is an advanced "
"log file viewer for the small-scale"
)
settings = "os", "compiler", "build_type", "arch"
exports_sources = "*"
no_copy_source = True
requires = (
"bzip2/1.0.8",
"libarchive/3.6.0",
"libcurl/7.85.0",
"ncurses/6.3",
"pcre2/10.40",
"readline/8.1.2",
"sqlite3/3.38.0",
"zlib/1.2.12",
)
generators = ("virtualrunenv",)
default_options = {
"libarchive:with_bzip2": True,
"libarchive:with_lz4": True,
"libarchive:with_lzo": True,
"libarchive:with_lzma": True,
"libarchive:with_zstd": True,
"pcre2:support_jit": True,
"pcre2:build_pcre2_8": True,
"sqlite3:enable_json1": True,
"sqlite3:enable_soundex": True,
"readline:with_library": "curses",
}
def generate(self):
CMakeToolchain(self).generate()
CMakeDeps(self).generate()
def build(self):
cmake = CMake(self)
cmake.configure()
if self.settings.os == "Macos" and self.settings.arch == "armv8":
cmake.definitions["CMAKE_SYSTEM_PROCESSOR"] = "arm64"
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
def deploy(self):
self.copy("*", dst="bin", src="bin")

@ -0,0 +1,70 @@
vcpkg_download_distfile(
ARCHIVE_PATH
URLS
"https://invisible-mirror.net/archives/ncurses/ncurses-${VERSION}.tar.gz"
"ftp://ftp.invisible-island.net/ncurses/ncurses-${VERSION}.tar.gz"
"https://ftp.gnu.org/gnu/ncurses/ncurses-${VERSION}.tar.gz"
FILENAME "ncurses-${VERSION}.tgz"
SHA512 1c2efff87a82a57e57b0c60023c87bae93f6718114c8f9dc010d4c21119a2f7576d0225dab5f0a227c2cfc6fb6bdbd62728e407f35fce5bf351bb50cf9e0fd34
)
vcpkg_extract_source_archive(
SOURCE_PATH
ARCHIVE "${ARCHIVE_PATH}"
)
vcpkg_list(SET OPTIONS)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
list(APPEND OPTIONS
--with-cxx-shared
--with-shared # "lib model"
--without-normal # "lib model"
)
endif ()
if (NOT VCPKG_TARGET_IS_MINGW)
list(APPEND OPTIONS
--enable-mixed-case
)
endif ()
if (VCPKG_TARGET_IS_MINGW)
list(APPEND OPTIONS
--disable-home-terminfo
--enable-term-driver
--disable-termcap
)
endif ()
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
DETERMINE_BUILD_TRIPLET
NO_ADDITIONAL_PATHS
OPTIONS
${OPTIONS}
--disable-db-install
--enable-pc-files
--enable-widec
--enable-sigwinch
--enable-termcap
--enable-ext-colors
--without-ada
--without-debug # "lib model"
--without-manpages
--without-progs
--without-tack
--without-tests
--with-pkg-config-libdir=libdir
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/bin")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")

@ -0,0 +1,10 @@
The package ncurses is compatible with built-in CMake variables:
set(CURSES_NEED_NCURSES TRUE)
find_package(Curses REQUIRED)
target_include_directories(main PRIVATE ${CURSES_INCLUDE_DIRS})
target_compile_options(main PRIVATE ${CURSES_CFLAGS})
target_link_libraries(main PRIVATE ${CURSES_LIBRARIES})
Blah

@ -0,0 +1,9 @@
{
"name": "ncurses",
"version": "6.4",
"port-version": 2,
"description": "Free software emulation of curses in System V Release 4.0, and more",
"homepage": "https://invisible-island.net/ncurses/announce.html",
"license": "MIT",
"supports": "!windows | mingw"
}

@ -0,0 +1 @@
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)

@ -0,0 +1,9 @@
{
"name": "readline-osx",
"version-date": "2020-01-04",
"description": "empty package, linking to readline-unix",
"supports": "osx",
"dependencies": [
"readline-unix"
]
}

@ -0,0 +1,34 @@
set(filename readline-${VERSION}.tar.gz)
vcpkg_download_distfile(
ARCHIVE
URLS
"https://ftpmirror.gnu.org/gnu/readline/${filename}"
"https://ftp.gnu.org/gnu/readline/${filename}"
FILENAME "${filename}"
SHA512 0a451d459146bfdeecc9cdd94bda6a6416d3e93abd80885a40b334312f16eb890f8618a27ca26868cebbddf1224983e631b1cbc002c1a4d1cd0d65fba9fea49a
)
vcpkg_extract_source_archive(SOURCE_PATH
ARCHIVE "${ARCHIVE}"
PATCHES
8.2p1.diff
)
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
DETERMINE_BUILD_TRIPLET
OPTIONS
--with-curses=yes
--disable-install-examples
)
vcpkg_install_make()
file(REMOVE_RECURSE
"${CURRENT_PACKAGES_DIR}/debug/share"
"${CURRENT_PACKAGES_DIR}/tools"
)
vcpkg_fixup_pkgconfig()
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

@ -0,0 +1,12 @@
{
"name": "readline-unix",
"version": "8.2",
"port-version": 1,
"description": "The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are typed in.",
"homepage": "https://tiswww.case.edu/php/chet/readline/rltop.html",
"license": "GPL-3.0-or-later",
"supports": "!windows",
"dependencies": [
"ncurses"
]
}

@ -0,0 +1,6 @@
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")
message(FATAL_ERROR "No implementation of readline is currently available for UWP targets")
endif()
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
FILE(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")

@ -0,0 +1,10 @@
the package readline can be used under windows via:
find_package(unofficial-readline-win32 CONFIG REQUIRED)
target_link_libraries(main PRIVATE unofficial::readline-win32::readline)
The package readline can be imported via the CMake FindPkgConfig module:
find_package(PkgConfig REQUIRED)
pkg_check_modules(readline REQUIRED IMPORTED_TARGET readline)
target_link_libraries(main PRIVATE PkgConfig::readline)

@ -0,0 +1,17 @@
{
"name": "readline",
"version": "0",
"port-version": 5,
"description": "GNU readline and history libraries",
"supports": "!uwp",
"dependencies": [
{
"name": "readline-unix",
"platform": "!windows"
},
{
"name": "readline-win32",
"platform": "windows"
}
]
}

@ -45,16 +45,23 @@ set(TIME_FORMATS
"%Y-%m-%d %H:%M:%S:%L"
"%Y-%m-%d %H:%M:%S"
"%Y-%m-%d %H:%M"
"%Y-%m-%dT%H:%M:%S %p %Z"
"%Y-%m-%dT%H:%M:%S.%N%z"
"%y-%m-%dT%H:%M:%S.%N%z"
"%Y-%m-%dT%H:%M:%S.%f%z"
"%y-%m-%dT%H:%M:%S.%f%z"
"%Y-%m-%dT%H:%M:%S.%L%z"
"%y-%m-%dT%H:%M:%S.%L%z"
"%Y-%m-%dT%H:%M:%S%z"
"%Y-%m-%dT%H:%M:%S"
"%Y-%m-%dT%H:%M:%S%z"
"%Y-%m-%dT%H:%M:%S"
"%Y-%m-%dT%H:%M"
"%Y/%m/%d %H:%M:%S %z"
"%Y/%m/%d %H:%M:%S%z"
"%Y/%m/%d %H:%M:%S.%f%z"
"%Y/%m/%d %H:%M:%S.%f%Z"
"%Y/%m/%d %H:%M:%S.%f %z"
"%Y/%m/%d %H:%M:%S.%f %Z"
"%Y/%m/%d %H:%M:%S.%f"
"%Y/%m/%d %H:%M:%S.%L"
"%Y/%m/%d %H:%M:%S"
@ -64,6 +71,7 @@ set(TIME_FORMATS
"%Y %b %d %H:%M:%S"
"%a %b %d %H:%M:%S %Y"
"%a %b %d %H:%M:%S.%f %Y"
"%a %b %d %H:%M:%S:%f %Y"
"%a %b %d %H:%M:%S %Z %Y"
"%a %b %d %I:%M:%S %p %Z %Y"
"%a %b %d %H:%M:%S "
@ -79,6 +87,7 @@ set(TIME_FORMATS
"%d %b %Y %H:%M:%S.%L"
"%d %b %Y %H:%M:%S,%L"
"%d %b %Y %H:%M"
"%b-%d %H:%M:%S"
"%b %d %H:%M:%S"
"%b %d %k:%M:%S"
"%b %d %l:%M:%S"
@ -110,6 +119,7 @@ set(TIME_FORMATS
"%Y/%m/%d"
"%Y/%m"
"%s.%f"
)
set(GEN_SRCS "")
@ -689,7 +699,9 @@ target_include_directories(diag PUBLIC . fmtlib ${CMAKE_CURRENT_BINARY_DIR}
third-party/date/include
third-party/prqlc-c
third-party/rapidyaml
${CURSES_INCLUDE_DIRS}
)
target_compile_options(diag PRIVATE ${CURSES_CFLAGS})
target_link_libraries(
diag

@ -76,8 +76,16 @@ add_library(
target_include_directories(base PUBLIC . .. ../third-party
../third-party/date/include
${CURSES_INCLUDE_DIRS}
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(base cppfmt cppscnlib pcrepp ncurses::libcurses pthread lnavdt datepp)
target_link_libraries(base
cppfmt
cppscnlib
pcrepp
${CURSES_LIBRARIES}
pthread
lnavdt
datepp)
add_executable(
test_base

@ -76,6 +76,8 @@
#elif defined HAVE_NCURSES_H
# include <ncurses.h>
# include <termcap.h>
#elif defined HAVE_CURSESW_H
# include <cursesw.h>
#elif defined HAVE_CURSES_H
# include <curses.h>
# include <termcap.h>

@ -1,6 +1,6 @@
#define HAVE_PCRE_H
#define HAVE_NCURSESW_CURSES_H
#define HAVE_CURSES_H
#define HAVE_ARCHIVE_H 1
#define HAVE_BZLIB_H 1

@ -432,7 +432,7 @@ public:
*/
void get_dimensions(vis_line_t& height_out, unsigned long& width_out) const
{
unsigned long height;
int height;
if (this->lv_window == nullptr) {
height_out = std::max(this->lv_height, 1_vl);
@ -442,7 +442,9 @@ public:
width_out = 80;
}
} else {
getmaxyx(this->lv_window, height, width_out);
int width_tmp;
getmaxyx(this->lv_window, height, width_tmp);
width_out = width_tmp;
if (this->lv_height < 0) {
height_out = vis_line_t(height) + this->lv_height
- vis_line_t(this->vc_y);

@ -6,7 +6,7 @@ add_library(pcrepp STATIC
target_include_directories(pcrepp PUBLIC . .. ../third-party/scnlib/include
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(pcrepp cppfmt pcre::libpcre pcre2::pcre2)
target_link_libraries(pcrepp cppfmt PCRE2::8BIT PCRE2::16BIT PCRE2::32BIT PCRE2::POSIX)
add_executable(test_pcre2pp test_pcre2pp.cc)
target_include_directories(

@ -1,5 +1,5 @@
add_library(remote STATIC ../config.h.in remote.ssh.cc remote.ssh.hh)
target_include_directories(remote PUBLIC . .. ../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(remote cppfmt pcre::libpcre)
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(remote cppfmt)

@ -48,11 +48,14 @@
# include <ncurses/curses.h>
#elif defined HAVE_NCURSES_H
# include <ncurses.h>
#elif defined HAVE_CURSESW_H
# include <cursesw.h>
#elif defined HAVE_CURSES_H
# include <curses.h>
#else
# error "SysV or X/Open-compatible Curses header file required"
#endif
#include <functional>
#include <map>
#include <string>
@ -251,8 +254,7 @@ public:
int ensure_color_pair(short fg, short bg);
int ensure_color_pair(std::optional<short> fg,
std::optional<short> bg);
int ensure_color_pair(std::optional<short> fg, std::optional<short> bg);
int ensure_color_pair(const styling::color_unit& fg,
const styling::color_unit& bg);

@ -107,7 +107,7 @@ protected:
/** @return The absolute Y position of this view. */
int get_actual_y()
{
unsigned long width, height;
int width, height;
int retval;
getmaxyx(this->vc_window, height, width);

@ -40,6 +40,8 @@
# include <ncursesw.h>
#elif defined HAVE_NCURSES_CURSES_H
# include <ncurses/curses.h>
#elif defined HAVE_CURSESW_H
# include <cursesw.h>
#elif defined HAVE_NCURSES_H
# include <ncurses.h>
#elif defined HAVE_CURSES_H

@ -13,7 +13,12 @@ add_library(
target_include_directories(yajlpp PUBLIC . .. ../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(yajlpp pcrepp yajl ncurses::libcurses datepp)
target_link_libraries(yajlpp
pcrepp
yajl
${CURSES_LIBRARIES}
datepp
)
add_executable(test_yajlpp test_yajlpp.cc)
target_link_libraries(test_yajlpp yajlpp base ${lnav_LIBS})

@ -0,0 +1,17 @@
{
"default-registry": {
"kind": "git",
"baseline": "cbf4a6641528cee6f172328984576f51698de726",
"repository": "https://github.com/microsoft/vcpkg"
},
"registries": [
{
"kind": "artifact",
"location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip",
"name": "microsoft"
}
],
"overlay-ports": [
"overlay-ports"
]
}

@ -0,0 +1,12 @@
{
"dependencies": [
"curl",
"libarchive",
"sqlite3",
"bzip2",
"pcre2",
"ncurses",
"readline",
"zlib"
]
}
Loading…
Cancel
Save