Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git CMakeLists.txt CMakeLists.txt
- index 4a2378b5e9..2ed0ccca4b 100644
- --- CMakeLists.txt
- +++ CMakeLists.txt
- @@ -54,0 +55 @@
- + set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${JASPER_LIBRARY})
- @@ -57,11 +58 @@
- -# paths from willuslib/wgs.c
- -find_program(GHOSTSCRIPT_EXECUTABLE gs
- -# PATHS /usr/bin /usr/share/gs /usr/local/gs /opt/gs
- -# /usr/share/gs* /usr/local/gs* /opt/gs*
- -)
- -if(GHOSTSCRIPT_EXECUTABLE)
- - set(HAVE_GHOSTSCRIPT 1)
- - message(STATUS "Found ghostscript executable")
- -else()
- - message(STATUS "Could NOT find ghostscript executable")
- -endif(GHOSTSCRIPT_EXECUTABLE)
- +set(HAVE_GHOSTSCRIPT 1)
- @@ -70 +60,0 @@
- -# HAVE_GSL_LIB
- @@ -71,0 +62,6 @@
- +pkg_check_modules(GSL gsl)
- +if(GSL_FOUND)
- + set(HAVE_GSL_LIB 1)
- + include_directories(SYSTEM ${GSL_INCLUDEDIR})
- + set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${GSL_LDFLAGS})
- +endif(GSL_FOUND)
- @@ -76,2 +71,0 @@
- -pkg_check_modules(MUPDF mupdf)
- -if(MUPDF_FOUND)
- @@ -79,7 +73 @@
- - # (includes jbig2dec, openjpeg, freetype)
- - include_directories(SYSTEM ${MUPDF_INCLUDEDIR})
- - message(STATUS "mupdf libraries: ${MUPDF_LDFLAGS}")
- - set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${MUPDF_LDFLAGS}
- - -lmupdf-js-none -lopenjpeg -ljbig2dec -ljpeg -lfreetype
- - )
- -endif(MUPDF_FOUND)
- +set(K2PDFOPT_LIB ${K2PDFOPT_LIB} -pthread -lmupdf -lmupdf-third -lopenjp2 -ljbig2dec -lfreetype -lharfbuzz)
- @@ -95,2 +91,14 @@
- -# HAVE_LEPTONICA_LIB
- -# HAVE_TESSERACT_LIB
- +
- +pkg_check_modules(LEPTONICA lept)
- +if(LEPTONICA_FOUND)
- + set(HAVE_LEPTONICA_LIB 1)
- + include_directories(SYSTEM ${LEPTONICA_INCLUDEDIR})
- + set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${LEPTONICA_LDFLAGS} ${LEPTONICA_LIBRARIES})
- +endif(LEPTONICA_FOUND)
- +
- +pkg_check_modules(TESSERACT tesseract)
- +if(TESSERACT_FOUND)
- + set(HAVE_TESSERACT_LIB 1)
- + include_directories(SYSTEM ${TESSERACT_INCLUDEDIR})
- + set(K2PDFOPT_LIB ${K2PDFOPT_LIB} ${TESSERACT_LDFLAGS})
- +endif(TESSERACT_FOUND)
- @@ -100 +108 @@
- -SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CMAKE -Wall")
- +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_CMAKE -Wall -Wextra")
- @@ -108,0 +117,2 @@
- +include_directories(${PROJECT_BINARY_DIR})
- +
- @@ -112 +121,0 @@
- -# ms
- @@ -114 +123 @@
- -target_link_libraries (k2pdfopt k2pdfoptlib willuslib ${K2PDFOPT_LIB})
- +target_link_libraries(k2pdfopt k2pdfoptlib willuslib ${K2PDFOPT_LIB})
- @@ -115,0 +125 @@
- +install(TARGETS k2pdfopt RUNTIME DESTINATION bin)
- diff --git willuslib/CMakeLists.txt willuslib/CMakeLists.txt
- index 463bbc95e7..104d02e360 100644
- --- willuslib/CMakeLists.txt
- +++ willuslib/CMakeLists.txt
- @@ -9 +9 @@
- - ocrjocr.c ocrtess.c pdfwrite.c point2d.c render.c strbuf.c string.c
- + ocrgocr.c ocrtess.c pdfwrite.c point2d.c render.c strbuf.c string.c
- @@ -24,0 +25,4 @@
- +if(TESSERACT_FOUND)
- + set(WILLUSLIB_SRC ${WILLUSLIB_SRC} ocrtess.c)
- +endif(TESSERACT_FOUND)
- +
- @@ -29,3 +33 @@
- -# HAVE_GOCR_LIB: ocrjocr.c
- -# HAVE_TESSERACT_LIB: ocrtess.c
- -
- +# HAVE_GOCR_LIB: ocrgocr.c
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement