Skip to content

Commit cdedb87

Browse files
committed
feat: use smaller archive of pdfwriter to speed up download
also make this package smaller by not including test materials
1 parent 16e0ad7 commit cdedb87

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# exclude tests from exported git archives
2+
TextExtractionTesting export-ignore

CMakeLists.txt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,24 @@ option(SHOULD_PARSE_INTERNAL_TABLES "should table parsing read internal tables"
1010
include(FetchContent)
1111
FetchContent_Declare(
1212
PDFHummus
13-
GIT_REPOSITORY https://github.com/galkahana/PDF-Writer.git
14-
GIT_TAG v4.5.10
13+
URL https://github.com/galkahana/PDF-Writer/archive/refs/tags/v4.6.2.tar.gz
14+
URL_HASH SHA256=0a36815ccc9d207028567f90039785c824b211169ba5da68de84d0c15455ab62
15+
DOWNLOAD_EXTRACT_TIMESTAMP FALSE
1516
FIND_PACKAGE_ARGS
1617
)
1718
FetchContent_MakeAvailable(PDFHummus)
1819

1920
# local code
2021
ADD_SUBDIRECTORY(TextExtraction)
2122
ADD_SUBDIRECTORY(TextExtractionCLI)
22-
enable_testing()
23-
ADD_SUBDIRECTORY(TextExtractionTesting)
23+
24+
if(PROJECT_IS_TOP_LEVEL AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/TextExtractionTesting)
25+
# avoid installing the testing materials altogether when included in another project.
26+
# it's annoying when in parent all, and more annoying to then get the tests added
27+
# to the parent project ctest.
28+
enable_testing()
29+
ADD_SUBDIRECTORY(TextExtractionTesting)
30+
endif()
2431

2532

2633
# cpack

0 commit comments

Comments
 (0)