Skip to content

Commit

Permalink
build: Fix building against RapidJSON 1.1.0 as sys dep (#4682)
Browse files Browse the repository at this point in the history
The last release of RapidJSON, 1.1.0 from 2016 (see
Tencent/rapidjson#1006 I guess), spells the variable in all caps:
https://github.com/Tencent/rapidjson/blob/v1.1.0/RapidJSONConfig.cmake.in
Use both spellings to accommodate both people on the last release and
people who have picked a newer git commit.

Co-authored-by: Jack Gerrits <jackgerrits@users.noreply.github.com>
  • Loading branch information
geofft and jackgerrits authored Feb 16, 2024
1 parent 305a795 commit 1675c6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext_libs/ext_libs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if(RAPIDJSON_SYS_DEP)
# Since EXACT is not specified, any version compatible with 1.1.0 is accepted (>= 1.1.0)
find_package(RapidJSON 1.1.0 CONFIG REQUIRED)
add_library(RapidJSON INTERFACE)
target_include_directories(RapidJSON INTERFACE ${RapidJSON_INCLUDE_DIRS})
target_include_directories(RapidJSON INTERFACE ${RapidJSON_INCLUDE_DIRS} ${RAPIDJSON_INCLUDE_DIRS})
else()
add_library(RapidJSON INTERFACE)
target_include_directories(RapidJSON SYSTEM INTERFACE "${CMAKE_CURRENT_LIST_DIR}/rapidjson/include")
Expand Down Expand Up @@ -127,4 +127,4 @@ if(VW_FEAT_CB_GRAPH_FEEDBACK)
target_include_directories(mlpack_ensmallen SYSTEM INTERFACE ${CMAKE_CURRENT_LIST_DIR}/armadillo-code/include)

target_include_directories(mlpack_ensmallen SYSTEM INTERFACE ${CMAKE_CURRENT_LIST_DIR}/ensmallen/include)
endif()
endif()

0 comments on commit 1675c6b

Please sign in to comment.