Skip to content

Commit

Permalink
(#25070) jwt-cpp: Fix missing picojson header
Browse files Browse the repository at this point in the history
  • Loading branch information
sophieeihpos committed Aug 29, 2024
1 parent 7266d08 commit babcb85
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions recipes/jwt-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ class JwtCppConan(ConanFile):
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"

@property
def _supports_generic_json(self):
return Version(self.version) >= "0.5.0"

def export_sources(self):
export_conandata_patches(self)

Expand All @@ -28,8 +24,7 @@ def layout(self):

def requirements(self):
self.requires("openssl/[>=1.1 <4]")
if not self._supports_generic_json:
self.requires("picojson/1.3.0")
self.requires("picojson/1.3.0")

def package_id(self):
self.info.clear()
Expand All @@ -48,9 +43,7 @@ def package(self):
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []

self.cpp_info.requires = ["picojson::picojson"]
self.cpp_info.set_property("cmake_file_name", "jwt-cpp")
self.cpp_info.set_property("cmake_target_name", "jwt-cpp::jwt-cpp")

if self._supports_generic_json:
self.cpp_info.defines.append("JWT_DISABLE_PICOJSON")

0 comments on commit babcb85

Please sign in to comment.