diff --git a/CMakeLists.txt b/CMakeLists.txt index 71df8dd..b5bdb90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,6 +41,7 @@ find_package(ZLIB REQUIRED) include(ExternalProject) find_program(MAKE_EXE NAMES gmake nmake make) +set(MUPDF_CFLAGS "-fPIC -DFZ_ENABLE_JS=0 -DFZ_ENABLE_ICC=0") ExternalProject_Add( mupdf # TODO: use master branch ? @@ -55,8 +56,7 @@ ExternalProject_Add( PREFIX "third-party/ext_mupdf" BINARY_DIR "third-party/ext_mupdf/src/mupdf" - BUILD_COMMAND CFLAGS=-fPIC HAVE_CURL=no HAVE_GLUT=no ${MAKE_EXE} -j 4 --silent - && ar d build/release/libmupdf-third.a jutils.o jdinput.o jdmarker.o jdmaster.o + BUILD_COMMAND export CFLAGS=${MUPDF_CFLAGS} && HAVE_CURL=no HAVE_GLUT=no USE_SYSTEM_LIBJPEG=yes ${MAKE_EXE} -j 3 --silent ) SET(MUPDF_LIB_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_mupdf/src/mupdf/build/release/) SET(MUPDF_INC_DIR ${CMAKE_CURRENT_BINARY_DIR}/third-party/ext_mupdf/src/mupdf/include/) diff --git a/libscan/cbr/cbr.c b/libscan/cbr/cbr.c index a281560..56e0049 100644 --- a/libscan/cbr/cbr.c +++ b/libscan/cbr/cbr.c @@ -2,7 +2,6 @@ #include "../scan.h" #include "../util.h" #include "../arc/arc.h" -#include "../ebook/ebook.h" #include #include diff --git a/libscan/cbr/cbr.h b/libscan/cbr/cbr.h index e791993..40c454f 100644 --- a/libscan/cbr/cbr.h +++ b/libscan/cbr/cbr.h @@ -2,7 +2,7 @@ #define SCAN_CBR_H #include -#include "../scan.h" +#include "../ebook/ebook.h" typedef struct { scan_ebook_ctx_t ebook_ctx; diff --git a/libscan/scan.h b/libscan/scan.h index 74f9eaf..5d6e555 100644 --- a/libscan/scan.h +++ b/libscan/scan.h @@ -144,17 +144,12 @@ typedef struct parse_job_t { doc->meta_tail->next = meta;\ doc->meta_tail = meta;\ } -#endif -#include "arc/arc.h" -#include "cbr/cbr.h" -#include "ebook/ebook.h" -#include "font/font.h" -#include "media/media.h" -#include "ooxml/ooxml.h" -#include "text/text.h" +#include "util.h" typedef void (*store_callback_t)(char *key, size_t key_len, char *buf, size_t buf_len); typedef void (*logf_callback_t)(char *filepath, int level, char *format, ...); typedef void (*log_callback_t)(char *filepath, int level, char *str); typedef void (*parse_callback_t)(parse_job_t *job); + +#endif