mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
start sixelanalyzer binary #1724
This commit is contained in:
parent
746d7af429
commit
61000ce2a4
@ -459,6 +459,29 @@ target_link_libraries(ncsixel-static
|
||||
PUBLIC
|
||||
notcurses-static
|
||||
)
|
||||
file(GLOB SIXELANALYZERSRC CONFIGURE DEPENDS src/sixelanalyzer/*.c)
|
||||
add_executable(sixelanalyzer ${SIXELANALYZERSRC})
|
||||
target_compile_definitions(sixelanalyzer
|
||||
PRIVATE
|
||||
_GNU_SOURCE
|
||||
)
|
||||
target_include_directories(sixelanalyzer
|
||||
BEFORE
|
||||
PRIVATE
|
||||
include
|
||||
src
|
||||
"${TERMINFO_INCLUDE_DIRS}"
|
||||
"${CMAKE_REQUIRED_INCLUDES}"
|
||||
"${PROJECT_BINARY_DIR}/include"
|
||||
)
|
||||
target_link_libraries(sixelanalyzer
|
||||
PRIVATE
|
||||
ncsixel
|
||||
${LIBM}
|
||||
${LIBRT}
|
||||
Threads::Threads
|
||||
)
|
||||
|
||||
############################################################################
|
||||
if(${USE_CXX})
|
||||
# libnotcurses++ (C++ wrappers)
|
||||
@ -1059,6 +1082,7 @@ if(BUILD_EXECUTABLES)
|
||||
install(TARGETS notcurses-demo DESTINATION bin)
|
||||
install(TARGETS notcurses-info DESTINATION bin)
|
||||
install(TARGETS ncneofetch DESTINATION bin)
|
||||
install(TARGETS sixelanalyzer DESTINATION bin)
|
||||
if(NOT WIN32)
|
||||
install(TARGETS tfman DESTINATION bin)
|
||||
endif()
|
||||
|
25
include/notcurses/libsixel.h
Normal file
25
include/notcurses/libsixel.h
Normal file
@ -0,0 +1,25 @@
|
||||
#ifndef NOTCURSES_LIBSIXEL
|
||||
#define NOTCURSES_LIBSIXEL
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct sixel;
|
||||
struct sixelctx;
|
||||
|
||||
struct sixelctx* libncsixel_init(void);
|
||||
|
||||
struct sixel* libncsixel_encode(struct sixelctx* sctx, const char* file, unsigned colorregs);
|
||||
|
||||
uint32_t* libncsixel_explode(const struct sixel* s);
|
||||
|
||||
void libncsixel_stop(struct sixelctx* sctx);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
6
src/sixelanalyzer/main.c
Normal file
6
src/sixelanalyzer/main.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <notcurses/libsixel.h>
|
||||
|
||||
int main(void){
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user