install version.h #1054

This commit is contained in:
nick black 2020-10-10 20:53:45 -04:00
parent 1fe53d98fb
commit da1b8d1d53
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
10 changed files with 17 additions and 13 deletions

View File

@ -5,7 +5,7 @@ name: debian-unstable
steps:
- name: debian-build
image: dankamongmen/unstable_builder:2020-09-29a
image: dankamongmen/unstable_builder:2020-10-10a
commands:
- export LANG=en_US.UTF-8
- mkdir build
@ -25,7 +25,7 @@ name: ubuntu-focal
steps:
- name: ubuntu-build
image: dankamongmen/focal:2020-09-22a
image: dankamongmen/focal:2020-10-10a
commands:
- export LANG=en_US.UTF-8
- mkdir build

View File

@ -341,7 +341,8 @@ target_compile_definitions(notcurses++-static
file(GLOB NOTCURSES_HEADERS
CONFIGURE_DEPENDS
LIST_DIRECTORIES false
${PROJECT_SOURCE_DIR}/include/notcurses/*.h)
${PROJECT_SOURCE_DIR}/include/notcurses/*.h
${CMAKE_CURRENT_BINARY_DIR}/include/version.h)
file(GLOB NCPP_HEADERS
CONFIGURE_DEPENDS
@ -591,6 +592,7 @@ install(FILES
include(CMakePackageConfigHelpers)
configure_file(tools/version.h.in include/version.h)
configure_file(tools/builddef.h.in include/builddef.h)
configure_package_config_file(tools/NotcursesConfig.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/NotcursesConfig.cmake

View File

@ -7,12 +7,8 @@
#include <limits.h>
#include <stdatomic.h>
#include <notcurses/notcurses.h>
#include <builddef.h>
#include <version.h>
#ifdef USE_FFMPEG
#include <libavutil/pixdesc.h>
#include <libavutil/avconfig.h>
#include <libavcodec/avcodec.h> // ffmpeg doesn't reliably "C"-guard itself
#endif
#ifdef __cplusplus
extern "C" {

View File

@ -7,8 +7,7 @@ void notcurses_debug(notcurses* nc, FILE* debugfp){
fprintf(debugfp, "*************************** notcurses debug state *****************************\n");
while(n){
fprintf(debugfp, "%04d off y: %3d x: %3d geom y: %3d x: %3d curs y: %3d x: %3d %p %.8s\n",
planeidx, n->absy, n->absx, n->leny, n->lenx, n->y, n->x,
n, n->name ? n->name : "");
planeidx, n->absy, n->absx, n->leny, n->lenx, n->y, n->x, n, n->name);
if(n->boundto || n->bnext || n->bprev || n->blist){
fprintf(debugfp, " bound %p → %p ← %p binds %p\n",
n->boundto, n->bnext, n->bprev, n->blist);

View File

@ -1,4 +1,4 @@
#include "version.h"
#include "builddef.h"
#ifdef USE_FFMPEG
#include "ffmpeg.h"
#include "internal.h"

View File

@ -6,6 +6,7 @@ extern "C" {
#endif
#include "version.h"
#include "builddef.h"
#ifdef USE_FFMPEG
#include <libavutil/error.h>

View File

@ -1,4 +1,4 @@
#include "version.h"
#include "builddef.h"
#ifdef USE_OIIO
#include "oiio.h"
#include "internal.h"

View File

@ -1,6 +1,6 @@
#include <cmath>
#include <cstring>
#include "version.h"
#include "builddef.h"
#include "visual-details.h"
#include "internal.h"

View File

@ -11,6 +11,7 @@
#include <unistd.h>
#include <ncpp/NotCurses.hh>
#include <ncpp/Visual.hh>
#include "builddef.h"
#include "version.h"
std::mutex ncmtx;

View File

@ -1,5 +1,10 @@
// Populated by CMake, and installed to the host system
#ifndef NOTCURSES_VERSION_HEADER
#define NOTCURSES_VERSION_HEADER
#define NOTCURSES_VERSION_MAJOR "@notcurses_VERSION_MAJOR@"
#define NOTCURSES_VERSION_MINOR "@notcurses_VERSION_MINOR@"
#define NOTCURSES_VERSION_PATCH "@notcurses_VERSION_PATCH@"
#define NOTCURSES_VERSION_TWEAK "@notcurses_VERSION_TWEAK@"
#endif