Skip to content

Commit 6427726

Browse files
fix: cmake-cxxopts by using similar approach as glm (#44)
* 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]>
1 parent ab54f91 commit 6427726

File tree

3 files changed

+25
-10
lines changed

3 files changed

+25
-10
lines changed

cmake/extlib_cxxopts.cmake

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ if(USE_SYSTEM_DEPS)
77
message(STATUS "using system-deps in extlib_cxxopts.cmake")
88

99
# this will define the cxxopts target
10-
find_package(cxxopts REQUIRED)
10+
# find_package(cxxopts REQUIRED)
1111

12-
add_library(${ext_name_cxxopts} INTERFACE IMPORTED)
13-
add_dependencies(${ext_name_cxxopts} cxxopts)
12+
# add_library(${ext_name_cxxopts} INTERFACE IMPORTED)
13+
# add_dependencies(${ext_name_cxxopts} cxxopts)
14+
15+
find_package(PkgConfig)
16+
pkg_check_modules(libcxxopts REQUIRED IMPORTED_TARGET cxxopts)
17+
add_library(${ext_name_cxxopts} ALIAS PkgConfig::libcxxopts)
1418

1519
else()
1620
message(STATUS "ignoring system-deps extlib_cxxopts.cmake")

cmake/extlib_loguru.cmake

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ if(USE_SYSTEM_DEPS)
77
message(STATUS "using system-deps in extlib_loguru.cmake")
88

99
# this will define the loguru target
10-
find_package(loguru REQUIRED)
10+
# find_package(loguru REQUIRED)
1111

12-
add_library(${ext_name_loguru} INTERFACE IMPORTED)
13-
add_dependencies(${ext_name_loguru} loguru)
12+
# add_library(${ext_name_loguru} INTERFACE IMPORTED)
13+
# add_dependencies(${ext_name_loguru} loguru)
14+
15+
find_package(loguru CONFIG REQUIRED)
16+
add_library(${ext_name_loguru} ALIAS loguru::loguru)
1417

1518
else()
1619
message(STATUS "ignoring system-deps extlib_loguru.cmake")

src/v2/pdf_decoders/document.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,12 @@ namespace pdflib
5757
timings({}),
5858
qpdf_document(),
5959

60-
qpdf_root(NULL),
61-
qpdf_pages(NULL),
60+
//qpdf_root(NULL),
61+
//qpdf_pages(NULL),
62+
63+
// have compatibulity between QPDF v10 and v11
64+
qpdf_root(),
65+
qpdf_pages(),
6266

6367
number_of_pages(-1),
6468
json_document(nlohmann::json::value_t::null)
@@ -71,8 +75,12 @@ namespace pdflib
7175
timings(timings_),
7276
qpdf_document(),
7377

74-
qpdf_root(NULL),
75-
qpdf_pages(NULL),
78+
//qpdf_root(NULL),
79+
//qpdf_pages(NULL),
80+
81+
// have compatibulity between QPDF v10 and v11
82+
qpdf_root(),
83+
qpdf_pages(),
7684

7785
number_of_pages(-1),
7886
json_document(nlohmann::json::value_t::null)

0 commit comments

Comments
 (0)