mirror of
https://github.com/simon987/libscan.git
synced 2025-04-05 12:23:00 +00:00
Fix build
This commit is contained in:
parent
42d5f09839
commit
f1fc83dc54
@ -31,7 +31,6 @@ add_library(
|
|||||||
set_target_properties(scan PROPERTIES LINKER_LANGUAGE C)
|
set_target_properties(scan PROPERTIES LINKER_LANGUAGE C)
|
||||||
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a .lib .so)
|
set(CMAKE_FIND_LIBRARY_SUFFIXES .a .lib .so)
|
||||||
target_link_directories(scan PUBLIC /usr/share/vcpkg/installed/x64-linux/lib/)
|
|
||||||
|
|
||||||
find_package(LibArchive REQUIRED)
|
find_package(LibArchive REQUIRED)
|
||||||
find_package(BZip2 REQUIRED)
|
find_package(BZip2 REQUIRED)
|
||||||
@ -42,8 +41,6 @@ find_package(Tesseract CONFIG REQUIRED)
|
|||||||
find_package(OpenJPEG CONFIG REQUIRED)
|
find_package(OpenJPEG CONFIG REQUIRED)
|
||||||
find_package(JPEG REQUIRED)
|
find_package(JPEG REQUIRED)
|
||||||
find_package(LibXml2 REQUIRED)
|
find_package(LibXml2 REQUIRED)
|
||||||
find_package(FFMPEG REQUIRED)
|
|
||||||
#find_package(OpenSSL REQUIRED)
|
|
||||||
find_package(LibLZMA REQUIRED)
|
find_package(LibLZMA REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
@ -58,7 +55,7 @@ find_library(MUPDF_LIB NAMES liblibmupdf.a)
|
|||||||
find_library(CMS_LIB NAMES lcms)
|
find_library(CMS_LIB NAMES lcms)
|
||||||
find_library(JAS_LIB NAMES jasper)
|
find_library(JAS_LIB NAMES jasper)
|
||||||
find_library(GUMBO_LIB NAMES gumbo)
|
find_library(GUMBO_LIB NAMES gumbo)
|
||||||
find_library(GOMP_LIB NAMES libgomp.a gomp PATHS /usr/lib/gcc/x86_64-linux-gnu/5/ /usr/lib/gcc/x86_64-linux-gnu/9/ /usr/lib/gcc/x86_64-linux-gnu/10/ /usr/lib/gcc/aarch64-linux-gnu/7/)
|
find_library(GOMP_LIB NAMES libgomp.a gomp PATHS /usr/lib/gcc/x86_64-linux-gnu/5/ /usr/lib/gcc/x86_64-linux-gnu/9/ /usr/lib/gcc/x86_64-linux-gnu/10/ /usr/lib/gcc/aarch64-linux-gnu/7/ /usr/lib/gcc/x86_64-linux-gnu/7/)
|
||||||
|
|
||||||
|
|
||||||
target_compile_options(
|
target_compile_options(
|
||||||
@ -112,6 +109,7 @@ ExternalProject_Add(
|
|||||||
)
|
)
|
||||||
|
|
||||||
SET(FFMPEG_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_ffmpeg/src/ffmpeg)
|
SET(FFMPEG_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_ffmpeg/src/ffmpeg)
|
||||||
|
SET(FFMPEG_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_ffmpeg/src/ffmpeg)
|
||||||
|
|
||||||
add_dependencies(
|
add_dependencies(
|
||||||
scan
|
scan
|
||||||
|
@ -18,12 +18,13 @@ typedef struct {
|
|||||||
int tn_size;
|
int tn_size;
|
||||||
float tn_qscale;
|
float tn_qscale;
|
||||||
long max_media_buffer;
|
long max_media_buffer;
|
||||||
|
int read_subtitles;
|
||||||
} scan_media_ctx_t;
|
} scan_media_ctx_t;
|
||||||
|
|
||||||
__always_inline
|
__always_inline
|
||||||
static AVCodecContext *alloc_jpeg_encoder(int w, int h, float qscale) {
|
static AVCodecContext *alloc_jpeg_encoder(int w, int h, float qscale) {
|
||||||
|
|
||||||
AVCodec *jpeg_codec = avcodec_find_encoder(AV_CODEC_ID_MJPEG);
|
const AVCodec *jpeg_codec = avcodec_find_encoder(AV_CODEC_ID_MJPEG);
|
||||||
AVCodecContext *jpeg = avcodec_alloc_context3(jpeg_codec);
|
AVCodecContext *jpeg = avcodec_alloc_context3(jpeg_codec);
|
||||||
jpeg->width = w;
|
jpeg->width = w;
|
||||||
jpeg->height = h;
|
jpeg->height = h;
|
||||||
@ -43,8 +44,9 @@ static AVCodecContext *alloc_jpeg_encoder(int w, int h, float qscale) {
|
|||||||
|
|
||||||
|
|
||||||
void parse_media(scan_media_ctx_t *ctx, vfile_t *f, document_t *doc);
|
void parse_media(scan_media_ctx_t *ctx, vfile_t *f, document_t *doc);
|
||||||
|
|
||||||
void init_media();
|
void init_media();
|
||||||
|
|
||||||
int store_image_thumbnail(scan_media_ctx_t *ctx, void* buf, size_t buf_len, document_t *doc, const char *url);
|
int store_image_thumbnail(scan_media_ctx_t *ctx, void *buf, size_t buf_len, document_t *doc, const char *url);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user