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 f11ac35
Show file tree
Hide file tree
Showing 40 changed files with 19,062 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ 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_library (SystemC::cci ALIAS cci)

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

target_include_directories(cci
PRIVATE
${RAPIDJSON_INCLUDE_DIRS})
${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include)

if (APPLE)
# It's OK that _sc_main is an undefined symbol.
Expand Down
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 f11ac35

Please sign in to comment.