Integrate PDF-Writer into your CMake project
mainThere are three primary ways to use PDF-Writer in your own C++ projects:
Option 1: CMake FetchContent (Recommended)
Automatically downloads and integrates the library during the configuration step. This is the easiest way to manage the dependency.
Option 2: find_package
Use this if you have already installed PDF-Writer on your system.
Option 3: Copy Sources
Manually copy the PDFWriter source folder into your project and include it in your build system.
# Option 1: FetchContent
include(FetchContent)
FetchContent_Declare(
PDFHummus
GIT_REPOSITORY https://github.com/galkahana/PDF-Writer.git
GIT_TAG v4.6.2
FIND_PACKAGE_ARGS
)
FetchContent_MakeAvailable(PDFHummus)
target_link_libraries(YourTarget PDFHummus::PDFWriter)