(cmake) Stop using FetchContent cmake module to retrieve jsoncpp third party dependency

This commit is contained in:
Benjamin Sergeant
2020-09-30 14:24:04 -07:00
parent 61dbcc2b84
commit 82e759732b
11 changed files with 8023 additions and 14 deletions

View File

@ -31,6 +31,11 @@ add_library(ixbots STATIC
${IXBOTS_HEADERS}
)
find_package(JsonCpp)
if (NOT JSONCPP_FOUND)
set(JSONCPP_INCLUDE_DIRS ../third_party/jsoncpp)
endif()
if (USE_PYTHON)
target_compile_definitions(ixbots PUBLIC IXBOTS_USE_PYTHON)
find_package(Python COMPONENTS Development)
@ -43,11 +48,12 @@ set(IXBOTS_INCLUDE_DIRS
../ixwebsocket
../ixcobra
../ixredis
../ixsentry)
../ixsentry
${JSONCPP_INCLUDE_DIRS}
${SPDLOG_INCLUDE_DIRS})
if (USE_PYTHON)
set(IXBOTS_INCLUDE_DIRS ${IXBOTS_INCLUDE_DIRS} ${Python_INCLUDE_DIRS})
endif()
target_include_directories( ixbots PUBLIC ${IXBOTS_INCLUDE_DIRS} )
target_link_libraries( ixbots jsoncpp_static )