mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
* only find nlohmann_json test dep when required * provide config-variable JWT_EXTERNAL_TEST_NLOHMANN_JSON * be a doll and make PICOJSON variables dependent * dont mention test in the option name I think in the longer term we'll probably switch to this since it;s maintained unlike the current default --------- Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
21 lines
666 B
CMake
21 lines
666 B
CMake
@PACKAGE_INIT@
|
|
|
|
set(JWT_DISABLE_PICOJSON @JWT_DISABLE_PICOJSON@)
|
|
set(JWT_EXTERNAL_PICOJSON @JWT_EXTERNAL_PICOJSON@)
|
|
set(JWT_SSL_LIBRARY @JWT_SSL_LIBRARY@)
|
|
|
|
include(CMakeFindDependencyMacro)
|
|
if(${JWT_SSL_LIBRARY} MATCHES "wolfSSL")
|
|
find_dependency(PkgConfig REQUIRED)
|
|
pkg_check_modules(wolfssl REQUIRED IMPORTED_TARGET wolfssl)
|
|
list(TRANSFORM wolfssl_INCLUDE_DIRS APPEND "/wolfssl") # This is required to access OpenSSL compatibility API
|
|
else()
|
|
find_dependency(${JWT_SSL_LIBRARY} REQUIRED)
|
|
endif()
|
|
|
|
if(NOT JWT_DISABLE_PICOJSON AND JWT_EXTERNAL_PICOJSON)
|
|
find_dependency(picojson REQUIRED)
|
|
endif()
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/jwt-cpp-targets.cmake")
|