diff --git a/recipes/tomlplusplus/all/conanfile.py b/recipes/tomlplusplus/all/conanfile.py index 1cd84fd4f16fd..4743d8a6d4255 100644 --- a/recipes/tomlplusplus/all/conanfile.py +++ b/recipes/tomlplusplus/all/conanfile.py @@ -79,6 +79,8 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tomlplusplus::tomlplusplus") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - if self.options.exceptions.value is not None: + # Casting as a String because None value would not be properly handled, this is a PackageOption, not the value itself + # which `is` never None + if str(self.options.exceptions) != "None": define_value = "1" if self.options.exceptions is True else "0" self.cpp_info.defines.append(f"TOML_EXCEPTIONS={define_value}")