Skip to content

Commit

Permalink
Add back RapidJSON dependency
Browse files Browse the repository at this point in the history
RapidJSON was originally removed from the CCI source tree, but since
RapidJSON does not release regularly we should ship the dependency
with CCI. This also improves the out-of-the-box experience when using
add_subdirectory() to import CCI into a CMake project.

Signed-off-by: Lukas Jünger <[email protected]>
  • Loading branch information
aut0 committed Apr 16, 2024
1 parent 704054c commit fd4f3bd
Show file tree
Hide file tree
Showing 41 changed files with 19,064 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ set (CMAKE_CXX_STANDARD ${SystemC_CXX_STANDARD} CACHE STRING
set (CMAKE_CXX_STANDARD_REQUIRED ${SystemC_CXX_STANDARD_REQUIRED} CACHE BOOL
"The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.")

find_package(RapidJSON CONFIG REQUIRED)

target_link_libraries(cci SystemC::systemc)
target_link_libraries(cci PUBLIC SystemC::systemc)

add_subdirectory(rapidjson)
target_link_libraries(cci PRIVATE rapidjson)

add_library (SystemC::cci ALIAS cci)

Expand Down Expand Up @@ -135,9 +135,7 @@ target_compile_options(
target_include_directories(cci
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
PRIVATE
${RAPIDJSON_INCLUDE_DIRS})
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

if (APPLE)
# It's OK that _sc_main is an undefined symbol.
Expand Down
3 changes: 3 additions & 0 deletions src/rapidjson/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_library(rapidjson INTERFACE)

target_include_directories(rapidjson INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/include)
1 change: 1 addition & 0 deletions src/rapidjson/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RapidJSON commit ID: 3f73edae00aba5b0112a80b4d41e6f1ff7d92a3d
Loading

0 comments on commit fd4f3bd

Please sign in to comment.