Skip to content

Commit

Permalink
cmake: use rapidjson headers from s3select's submodule
Browse files Browse the repository at this point in the history
Signed-off-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley committed Nov 30, 2022
1 parent f5fc9e6 commit ecf211e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,13 @@ list(APPEND mds_files
add_subdirectory(json_spirit)

include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/xxHash")
include_directories(SYSTEM "${CMAKE_SOURCE_DIR}/src/rapidjson/include")

# use the rapidjson headers from s3select's submodule
if(NOT TARGET RapidJSON::RapidJSON)
add_library(RapidJSON::RapidJSON INTERFACE IMPORTED)
set_target_properties(RapidJSON::RapidJSON PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/s3select/rapidjson/include")
endif()

option(WITH_FMT_HEADER_ONLY "use header-only version of fmt library" OFF)
find_package(fmt 7.0.0 QUIET)
Expand Down
3 changes: 2 additions & 1 deletion src/rgw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ target_link_libraries(rgw_common
${ALLOC_LIBS}
PUBLIC
${LUA_LIBRARIES}
RapidJSON::RapidJSON
spawn)
target_include_directories(rgw_common
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/services"
Expand Down Expand Up @@ -359,7 +360,6 @@ add_library(rgw_a STATIC
target_compile_definitions(rgw_a PUBLIC "-DCLS_CLIENT_HIDE_IOCTX")

target_include_directories(rgw_a
SYSTEM PUBLIC "../rapidjson/include"
PUBLIC "${CMAKE_SOURCE_DIR}/src/dmclock/support/src"
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw/store/rados"
Expand Down Expand Up @@ -494,6 +494,7 @@ target_link_libraries(rgw
${CURL_LIBRARIES}
${EXPAT_LIBRARIES}
PUBLIC
RapidJSON::RapidJSON
dmclock::dmclock)

if(WITH_RADOSGW_AMQP_ENDPOINT)
Expand Down

0 comments on commit ecf211e

Please sign in to comment.