Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/scripts/build_rhel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ sudo -E XDG_RUNTIME_DIR= podman build --progress=plain \
--no-deps --no-build-isolation -w /dist/ \
/src/docling_parse*.tar.gz \
&& pip3.11 install /dist/docling_parse*.whl \
&& python3.11 -c 'from docling_parse.pdf_parsers import pdf_parser_v1, pdf_parser_v2'
&& python3.11 -c 'from docling_parse.pdf_parsers import pdf_parser_v2'

COPY ./tests /src/tests

Expand Down
21 changes: 6 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ include(cmake/extlib_loguru.cmake)
include(cmake/extlib_json.cmake)
include(cmake/extlib_utf8.git.cmake)
include(cmake/extlib_jpeg.cmake)
include(cmake/extlib_qpdf_v11.cmake)
# include(cmake/extlib_qpdf_v11.cmake)
include(cmake/extlib_qpdf_v12.cmake)

# aggregate the targets created by the dependencies
set(DEPENDENCIES qpdf jpeg utf8 json loguru cxxopts)
Expand Down Expand Up @@ -146,43 +147,33 @@ message(STATUS "cmake dependencies: ${DEPENDENCIES_SEMICOLON}")
string(REPLACE ";" ";" LIBLINK_SEMICOLON "${LIB_LINK}")
message(STATUS "cmake lib-link: ${LIBLINK_SEMICOLON}")

add_executable(parse_v1.exe "${TOPLEVEL_PREFIX_PATH}/app/parse_v1.cpp")
add_executable(parse_v2.exe "${TOPLEVEL_PREFIX_PATH}/app/parse_v2.cpp")
add_executable(parse_v2_fonts.exe "${TOPLEVEL_PREFIX_PATH}/app/parse_v2_fonts.cpp")

set_property(TARGET parse_v1.exe PROPERTY CXX_STANDARD 20)
set_property(TARGET parse_v2.exe PROPERTY CXX_STANDARD 20)
set_property(TARGET parse_v2_fonts.exe PROPERTY CXX_STANDARD 20)

add_dependencies(parse_v1.exe ${DEPENDENCIES})
add_dependencies(parse_v2.exe ${DEPENDENCIES})
add_dependencies(parse_v2_fonts.exe ${DEPENDENCIES})

target_include_directories(parse_v1.exe INTERFACE ${DEPENDENCIES})
target_include_directories(parse_v2.exe INTERFACE ${DEPENDENCIES})
target_include_directories(parse_v2_fonts.exe INTERFACE ${DEPENDENCIES})

target_link_libraries(parse_v1.exe ${DEPENDENCIES} ${LIB_LINK})
target_link_libraries(parse_v2.exe ${DEPENDENCIES} ${LIB_LINK})
target_link_libraries(parse_v2_fonts.exe ${DEPENDENCIES} ${LIB_LINK})

# **********************
# *** Libraries ***
# **********************

add_library(parse_v1 STATIC "${TOPLEVEL_PREFIX_PATH}/app/parse_v1.cpp")
add_library(parse_v2 STATIC "${TOPLEVEL_PREFIX_PATH}/app/parse_v2.cpp")

add_dependencies(parse_v1 ${DEPENDENCIES})
add_dependencies(parse_v2 ${DEPENDENCIES})

target_include_directories(parse_v1 INTERFACE ${DEPENDENCIES})
target_include_directories(parse_v2 INTERFACE ${DEPENDENCIES})

set_target_properties(parse_v1 PROPERTIES POSITION_INDEPENDENT_CODE ON)
set_target_properties(parse_v2 PROPERTIES POSITION_INDEPENDENT_CODE ON)

target_link_libraries(parse_v1 ${DEPENDENCIES} ${LIB_LINK})
target_link_libraries(parse_v2 ${DEPENDENCIES} ${LIB_LINK})

# ***************************
Expand All @@ -196,17 +187,17 @@ find_package(pybind11 CONFIG REQUIRED)
#pybind11_add_module(docling_parse "${TOPLEVEL_PREFIX_PATH}/app/pybind_parse.cpp")
pybind11_add_module(pdf_parsers "${TOPLEVEL_PREFIX_PATH}/app/pybind_parse.cpp")

#add_dependencies(docling_parse parse_v1 parse_v2)
add_dependencies(pdf_parsers parse_v1 parse_v2)
#add_dependencies(docling_parse parse_v2)
add_dependencies(pdf_parsers parse_v2)

#target_include_directories(docling_parse INTERFACE ${DEPENDENCIES})
target_include_directories(pdf_parsers INTERFACE ${DEPENDENCIES})

#target_compile_definitions(docling_parse PRIVATE VERSION_INFO=${CMAKE_PROJECT_VERSION})
target_compile_definitions(pdf_parsers PRIVATE VERSION_INFO=${CMAKE_PROJECT_VERSION})

#target_link_libraries(docling_parse PRIVATE parse_v1 parse_v2)
target_link_libraries(pdf_parsers PRIVATE parse_v1 parse_v2)
#target_link_libraries(docling_parse PRIVATE parse_v2)
target_link_libraries(pdf_parsers PRIVATE parse_v2)

# *****************
# *** Install ***
Expand Down
186 changes: 0 additions & 186 deletions app/parse_v1.cpp

This file was deleted.

Loading
Loading