Skip to content

Commit

Permalink
fix: cmake-cxxopts by using similar approach as glm (#44)
Browse files Browse the repository at this point in the history
* fix: cmake-cxxopts by using similar approach as glm

Signed-off-by: Peter Staar <[email protected]>

* fixed the loguru cmake

Signed-off-by: Peter Staar <[email protected]>

* trying to be compatible with qpdf v10 and v11

Signed-off-by: Peter Staar <[email protected]>

---------

Signed-off-by: Peter Staar <[email protected]>
  • Loading branch information
PeterStaar-IBM authored Oct 18, 2024
1 parent ab54f91 commit 6427726
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 10 deletions.
10 changes: 7 additions & 3 deletions cmake/extlib_cxxopts.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@ if(USE_SYSTEM_DEPS)
message(STATUS "using system-deps in extlib_cxxopts.cmake")

# this will define the cxxopts target
find_package(cxxopts REQUIRED)
# find_package(cxxopts REQUIRED)

add_library(${ext_name_cxxopts} INTERFACE IMPORTED)
add_dependencies(${ext_name_cxxopts} cxxopts)
# add_library(${ext_name_cxxopts} INTERFACE IMPORTED)
# add_dependencies(${ext_name_cxxopts} cxxopts)

find_package(PkgConfig)
pkg_check_modules(libcxxopts REQUIRED IMPORTED_TARGET cxxopts)
add_library(${ext_name_cxxopts} ALIAS PkgConfig::libcxxopts)

else()
message(STATUS "ignoring system-deps extlib_cxxopts.cmake")
Expand Down
9 changes: 6 additions & 3 deletions cmake/extlib_loguru.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@ if(USE_SYSTEM_DEPS)
message(STATUS "using system-deps in extlib_loguru.cmake")

# this will define the loguru target
find_package(loguru REQUIRED)
# find_package(loguru REQUIRED)

add_library(${ext_name_loguru} INTERFACE IMPORTED)
add_dependencies(${ext_name_loguru} loguru)
# add_library(${ext_name_loguru} INTERFACE IMPORTED)
# add_dependencies(${ext_name_loguru} loguru)

find_package(loguru CONFIG REQUIRED)
add_library(${ext_name_loguru} ALIAS loguru::loguru)

else()
message(STATUS "ignoring system-deps extlib_loguru.cmake")
Expand Down
16 changes: 12 additions & 4 deletions src/v2/pdf_decoders/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ namespace pdflib
timings({}),
qpdf_document(),

qpdf_root(NULL),
qpdf_pages(NULL),
//qpdf_root(NULL),
//qpdf_pages(NULL),

// have compatibulity between QPDF v10 and v11
qpdf_root(),
qpdf_pages(),

number_of_pages(-1),
json_document(nlohmann::json::value_t::null)
Expand All @@ -71,8 +75,12 @@ namespace pdflib
timings(timings_),
qpdf_document(),

qpdf_root(NULL),
qpdf_pages(NULL),
//qpdf_root(NULL),
//qpdf_pages(NULL),

// have compatibulity between QPDF v10 and v11
qpdf_root(),
qpdf_pages(),

number_of_pages(-1),
json_document(nlohmann::json::value_t::null)
Expand Down

0 comments on commit 6427726

Please sign in to comment.