externals: allow users to use system cpp-jwt libraries (#6976)

This commit is contained in:
Castor215
2023-09-28 16:31:14 -07:00
committed by GitHub
parent a35f8cbb78
commit 38f310f716
2 changed files with 10 additions and 3 deletions
+9 -3
View File
@@ -210,9 +210,15 @@ endif()
# cpp-jwt
if (ENABLE_WEB_SERVICE)
add_library(cpp-jwt INTERFACE)
target_include_directories(cpp-jwt INTERFACE ./cpp-jwt/include)
target_compile_definitions(cpp-jwt INTERFACE CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
if (USE_SYSTEM_CPP_JWT)
find_package(cpp-jwt REQUIRED)
add_library(cpp-jwt INTERFACE)
target_link_libraries(cpp-jwt INTERFACE cpp-jwt::cpp-jwt)
else()
add_library(cpp-jwt INTERFACE)
target_include_directories(cpp-jwt INTERFACE ./cpp-jwt/include)
target_compile_definitions(cpp-jwt INTERFACE CPP_JWT_USE_VENDORED_NLOHMANN_JSON)
endif()
endif()
# lodepng