Add nlohmann::json dependency
This commit is contained in:
parent
4bded5e501
commit
1da9da7e6f
@ -75,6 +75,7 @@ endif()
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(cmark libcmark)
|
||||
pkg_check_modules(json "nlohmann_json >= 3.11.2" REQUIRED)
|
||||
|
||||
if (cmark_FOUND)
|
||||
set(USE_SYSTEM_CMARK True)
|
||||
|
@ -16,6 +16,11 @@ add_library(mdml OBJECT
|
||||
|
||||
set(LIBMDML_DEP_LIBS ${LIBMDML_DEP_LIBS} ${STACKTRACE_DEP_LIBS} )
|
||||
|
||||
if(json_FOUND)
|
||||
target_include_directories(mdml PUBLIC ${json_INCLUDE_DIRS})
|
||||
set(LIBMDML_DEP_LIBS ${LIBMDML_DEP_LIBS} ${json_LIBRARIES} )
|
||||
endif()
|
||||
|
||||
if (USE_SYSTEM_CMARK)
|
||||
set(LIBMDML_DEP_LIBS ${LIBMDML_DEP_LIBS} ${cmark_LIBRARIES} )
|
||||
else()
|
||||
|
@ -13,7 +13,7 @@ set_target_properties(test-runner PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests"
|
||||
)
|
||||
|
||||
target_link_directories(test-runner PRIVATE ${CATCH2_LIBRARY_DIRS})
|
||||
target_link_directories(test-runner PRIVATE ${Catch2_LIBRARY_DIRS})
|
||||
target_include_directories(test-runner PRIVATE ${Catch2_INCLUDE_DIRS})
|
||||
|
||||
# Link the test executable with libmdml and Catch2
|
||||
|
Loading…
Reference in New Issue
Block a user