Skip to content

Commit a2c9100

Browse files
Cmake finds only downloaded rapidjson (#254)
1 parent 9ae7e1f commit a2c9100

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

thirdparty/internal_deps.cmake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,18 +44,23 @@ set (RAPIDJSON_ENABLE_INSTRUMENTATION_OPT OFF CACHE BOOL "" FORCE)
4444

4545
FetchContent_Declare(
4646
rapidjson
47+
# GIT_TAG f9d53419e912910fd8fa57d5705fa41425428c35 - latest but broken revision
4748
URL https://github.com/Tencent/rapidjson/archive/973dc9c06dcd3d035ebd039cfb9ea457721ec213.tar.gz
4849
URL_HASH SHA256=d0c9e52823d493206eb721d38cb3a669ca0212360862bd15a3c2f7d35ea7c6f7
4950
)
50-
# GIT_TAG f9d53419e912910fd8fa57d5705fa41425428c35 - latest but broken revision
5151
FetchContent_MakeAvailable(rapidjson)
52-
find_package(RapidJSON REQUIRED)
52+
53+
find_package(RapidJSON REQUIRED
54+
PATHS "${rapidjson_BINARY_DIR}"
55+
NO_DEFAULT_PATH)
56+
5357
add_library(RapidJson INTERFACE)
5458
target_include_directories(RapidJson
5559
INTERFACE
5660
$<BUILD_INTERFACE:${RapidJSON_INCLUDE_DIR}>
5761
$<INSTALL_INTERFACE:include>
5862
)
63+
5964
if (JINJA2CPP_BUILD_TESTS)
6065
set (JSON_BuildTests OFF CACHE BOOL "" FORCE)
6166
set (JSON_Install OFF CACHE BOOL "" FORCE)

0 commit comments

Comments
 (0)