2020-05-08 14:11:19 +00:00
|
|
|
if (USE_INTERNAL_POCO_LIBRARY)
|
|
|
|
# Poco::JSON (pdjson)
|
|
|
|
|
|
|
|
set (SRCS_PDJSON
|
2021-04-24 19:47:52 +00:00
|
|
|
"${LIBRARY_DIR}/JSON/src/pdjson.c"
|
2020-05-08 14:11:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library (_poco_json_pdjson ${SRCS_PDJSON})
|
|
|
|
add_library (Poco::JSON::Pdjson ALIAS _poco_json_pdjson)
|
|
|
|
|
|
|
|
# Poco::JSON
|
|
|
|
|
|
|
|
set (SRCS
|
2021-04-24 19:47:52 +00:00
|
|
|
"${LIBRARY_DIR}/JSON/src/Array.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/Handler.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/JSONException.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/Object.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/ParseHandler.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/Parser.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/ParserImpl.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/PrintHandler.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/Query.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/Stringifier.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/Template.cpp"
|
|
|
|
"${LIBRARY_DIR}/JSON/src/TemplateCache.cpp"
|
2020-05-08 14:11:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_library (_poco_json ${SRCS})
|
|
|
|
add_library (Poco::JSON ALIAS _poco_json)
|
|
|
|
|
2021-04-24 19:47:52 +00:00
|
|
|
target_include_directories (_poco_json SYSTEM PUBLIC "${LIBRARY_DIR}/JSON/include")
|
2020-05-08 14:11:19 +00:00
|
|
|
target_link_libraries (_poco_json PUBLIC Poco::Foundation Poco::JSON::Pdjson)
|
|
|
|
else ()
|
|
|
|
add_library (Poco::JSON UNKNOWN IMPORTED GLOBAL)
|
|
|
|
|
|
|
|
find_library (LIBRARY_POCO_JSON PocoJSON)
|
|
|
|
find_path (INCLUDE_POCO_JSON Poco/JSON/JSON.h)
|
|
|
|
set_target_properties (Poco::JSON PROPERTIES IMPORTED_LOCATION ${LIBRARY_POCO_JSON})
|
|
|
|
set_target_properties (Poco::JSON PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_POCO_JSON})
|
|
|
|
|
|
|
|
message (STATUS "Using Poco::JSON: ${LIBRARY_POCO_JSON} ${INCLUDE_POCO_JSON}")
|
|
|
|
endif ()
|