We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
[package] poco/1.10.1: Options not available / not correctly parsed
### Package and Environment Details
  * Package Name/Version: **poco/1.10.1**
  * Operating System+version: **Windows 10 64-bit**
  * Compiler+version: **Visual Studio 15**
  * Conan version: **conan 1.22.2**
  * Python version: **Python 3.7.1**

---

I'm currently setting up a Poco-example project with Conan and I'm basically disabling every option (project only relies on Poco::Foundation).
However, when I use a list of options to disable, which also includes
- `poco:enable_encodings=False`
- `poco:enable_jwt=False`

I get the errors:
```
ERROR: poco/1.10.1: 'options.enable_encodings' doesn't exist
```
or
```
ERROR: poco/1.10.1: 'options.enable_jwt' doesn't exist
```

Looking at the `conanfile.py` that totally makes sense since these options are not available. **Why is that?**

However, If I use upper case options
- `Poco:enable_encodings=False`
- `Poco:enable_jwt=False`

I don't get any error; all options that can be disabled are disabled after build and encodings and jwt (as well as depending libraries) are created.

So I guess if `poco` was written in lower case some kind of "option-check" is performed before building Poco. If `Poco` was written in upper case the check is not performed but the options are correctly sent to Conan.

Additionally I tested this by adding arbitrary options
- `poco:enable_foobar=False`
- `Poco:enable_foobar=False`

Both did not make any difference in detecting unsupported options.

I think it would make sense to inform a user 
- if upper case namespace options are not available (`Poco:enable_encodings=False`)
- if upper case / lower case options are not available at all (`poco:enable_foobar=False`)

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `recipes/poco/all/conanfile.py`
Content:
```
1 import os
2 
3 from conans import ConanFile, CMake, tools
4 from conans.errors import ConanInvalidConfiguration
5 from conans.tools import Version
6 
7 
8 class PocoConan(ConanFile):
9     name = "poco"
10     url = "https://github.com/conan-io/conan-center-index"
11     homepage = "https://pocoproject.org"
12     topics = ("conan", "poco", "building", "networking", "server", "mobile", "embedded")
13     exports_sources = "CMakeLists.txt"
14     generators = "cmake"
15     settings = "os", "arch", "compiler", "build_type"
16     license = "BSL-1.0"
17     description = "Modern, powerful open source C++ class libraries for building network- and internet-based " \
18                   "applications that run on desktop, server, mobile and embedded systems."
19     options = {"shared": [True, False],
20                "fPIC": [True, False],
21                "enable_xml": [True, False],
22                "enable_json": [True, False],
23                "enable_mongodb": [True, False],
24                "enable_pdf": [True, False],
25                "enable_util": [True, False],
26                "enable_net": [True, False],
27                "enable_netssl": [True, False],
28                "enable_netssl_win": [True, False],
29                "enable_crypto": [True, False],
30                "enable_data": [True, False],
31                "enable_data_sqlite": [True, False],
32                "enable_data_mysql": [True, False],
33                "enable_data_odbc": [True, False],
34                "enable_sevenzip": [True, False],
35                "enable_zip": [True, False],
36                "enable_apacheconnector": [True, False],
37                "enable_cppparser": [True, False],
38                "enable_pocodoc": [True, False],
39                "enable_pagecompiler": [True, False],
40                "enable_pagecompiler_file2page": [True, False],
41                "enable_redis": [True, False],
42                "force_openssl": [True, False],
43                "enable_tests": [True, False],
44                "poco_unbundled": [True, False],
45                "cxx_14": [True, False]
46               }
47     default_options = {
48                 "shared": False,
49                 "fPIC": True,
50                 "enable_xml": True,
51                 "enable_json": True,
52                 "enable_mongodb": True,
53                 "enable_pdf": False,
54                 "enable_util": True,
55                 "enable_net": True,
56                 "enable_netssl": True,
57                 "enable_netssl_win": True,
58                 "enable_crypto": True,
59                 "enable_data": True,
60                 "enable_data_sqlite": True,
61                 "enable_data_mysql": False,
62                 "enable_data_odbc": False,
63                 "enable_sevenzip": False,
64                 "enable_zip": True,
65                 "enable_apacheconnector": False,
66                 "enable_cppparser": False,
67                 "enable_pocodoc": False,
68                 "enable_pagecompiler": False,
69                 "enable_pagecompiler_file2page": False,
70                 "enable_redis": True,
71                 "force_openssl": True,
72                 "enable_tests": False,
73                 "poco_unbundled": False,
74                 "cxx_14": False
75             }
76 
77     @property
78     def _source_subfolder(self):
79         return "source_subfolder"
80 
81     @property
82     def _build_subfolder(self):
83         return "build_subfolder"
84 
85     def source(self):
86         tools.get(**self.conan_data["sources"][self.version])
87         extracted_folder = "poco-poco-{}-release".format(self.version)
88         os.rename(extracted_folder, self._source_subfolder)
89 
90     def config_options(self):
91         if self.settings.os == "Windows":
92             del self.options.fPIC
93 
94     def configure(self):
95         if self.options.enable_apacheconnector:
96             raise ConanInvalidConfiguration("Apache connector not supported: https://github.com/pocoproject/poco/issues/1764")
97         if self.options.enable_data_mysql:
98             raise ConanInvalidConfiguration("MySQL not supported yet, open an issue here please: %s" % self.url)
99 
100     def requirements(self):
101         if self.options.enable_netssl or \
102            self.options.enable_netssl_win or \
103            self.options.enable_crypto or \
104            self.options.force_openssl:
105             self.requires.add("openssl/1.0.2t")
106 
107     def _patch(self):
108         if self.settings.compiler == "Visual Studio":
109             replace = "POCO_INSTALL_PDB(${target_name})"
110             tools.replace_in_file(os.path.join(self._source_subfolder, "cmake", "PocoMacros.cmake"), replace, "# " + replace)
111             if self.options.shared:
112                 self.output.warn("Adding ws2_32 dependency...")
113                 replace = 'Net Util Foundation Crypt32.lib'
114                 if Version(self.version) >= "1.10.0":
115                     replace = 'Poco::Net Poco::Util Crypt32.lib'
116                 tools.replace_in_file(os.path.join(self._source_subfolder, "NetSSL_Win", "CMakeLists.txt"), replace, replace + " ws2_32 ")
117 
118                 replace = 'Foundation ${OPENSSL_LIBRARIES}'
119                 if Version(self.version) >= "1.10.0":
120                     replace = 'Poco::Foundation OpenSSL::SSL OpenSSL::Crypto'
121                 tools.replace_in_file(os.path.join(self._source_subfolder, "Crypto", "CMakeLists.txt"), replace, replace + " ws2_32 Crypt32.lib")
122 
123         # Poco 1.9.x - CMAKE_SOURCE_DIR is required in many places
124         os.rename(os.path.join(self._source_subfolder, "CMakeLists.txt"), os.path.join(self._source_subfolder, "CMakeListsOriginal.cmake"))
125         os.rename("CMakeLists.txt", os.path.join(self._source_subfolder, "CMakeLists.txt"))
126 
127     def _configure_cmake(self):
128         cmake = CMake(self, parallel=None)
129         for option_name in self.options.values.fields:
130             activated = getattr(self.options, option_name)
131             if option_name == "shared":
132                 cmake.definitions["POCO_STATIC"] = "OFF" if activated else "ON"
133             elif not option_name == "fPIC":
134                 cmake.definitions[option_name.upper()] = "ON" if activated else "OFF"
135 
136         cmake.definitions["CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP"] = True
137         if self.settings.os == "Windows" and self.settings.compiler == "Visual Studio":  # MT or MTd
138             cmake.definitions["POCO_MT"] = "ON" if "MT" in str(self.settings.compiler.runtime) else "OFF"
139         self.output.info(cmake.definitions)
140         cmake.configure(build_dir=self._build_subfolder, source_dir=os.path.join("..", self._source_subfolder))
141         return cmake
142 
143     def build(self):
144         self._patch()
145         cmake = self._configure_cmake()
146         cmake.build()
147 
148     def package(self):
149         self.copy("LICENSE", dst="licenses", src=self._source_subfolder)
150         cmake = self._configure_cmake()
151         cmake.install()
152         tools.rmdir(os.path.join(self.package_folder, "lib", "cmake"))
153         tools.rmdir(os.path.join(self.package_folder, "cmake"))
154 
155     def package_info(self):
156         libs = [("enable_mongodb", "PocoMongoDB"),
157                 ("enable_pdf", "PocoPDF"),
158                 ("enable_netssl", "PocoNetSSL"),
159                 ("enable_netssl_win", "PocoNetSSLWin"),
160                 ("enable_net", "PocoNet"),
161                 ("enable_crypto", "PocoCrypto"),
162                 ("enable_data_sqlite", "PocoDataSQLite"),
163                 ("enable_data_mysql", "PocoDataMySQL"),
164                 ("enable_data_odbc", "PocoDataODBC"),
165                 ("enable_data", "PocoData"),
166                 ("enable_sevenzip", "PocoSevenZip"),
167                 ("enable_zip", "PocoZip"),
168                 ("enable_apacheconnector", "PocoApacheConnector"),
169                 ("enable_util", "PocoUtil"),
170                 ("enable_xml", "PocoXML"),
171                 ("enable_json", "PocoJSON"),
172                 ("enable_redis", "PocoRedis")]
173 
174         suffix = str(self.settings.compiler.runtime).lower()  \
175                  if self.settings.compiler == "Visual Studio" and not self.options.shared \
176                  else ("d" if self.settings.build_type=="Debug" else "")
177         for flag, lib in libs:
178             if getattr(self.options, flag):
179                 if self.settings.os == "Windows" and flag == "enable_netssl" and self.options.enable_netssl_win:
180                     continue
181 
182                 if self.settings.os != "Windows" and flag == "enable_netssl_win":
183                     continue
184 
185                 self.cpp_info.libs.append("%s%s" % (lib, suffix))
186 
187         self.cpp_info.libs.append("PocoFoundation%s" % suffix)
188 
189         # in linux we need to link also with these libs
190         if self.settings.os == "Linux":
191             self.cpp_info.libs.extend(["pthread", "dl", "rt"])
192 
193         if not self.options.shared:
194             self.cpp_info.defines.extend(["POCO_STATIC=ON", "POCO_NO_AUTOMATIC_LIBS"])
195             if self.settings.compiler == "Visual Studio":
196                 self.cpp_info.libs.extend(["ws2_32", "Iphlpapi", "Crypt32"])
197         self.cpp_info.names["cmake_find_package"] = "Poco"
198         self.cpp_info.names["cmake_find_package_multi"] = "Poco"
199
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py
--- a/recipes/poco/all/conanfile.py
+++ b/recipes/poco/all/conanfile.py
@@ -31,6 +31,8 @@
                "enable_data_sqlite": [True, False],
                "enable_data_mysql": [True, False],
                "enable_data_odbc": [True, False],
+               "enable_encodings": [True, False],
+               "enable_jwt": [True, False],
                "enable_sevenzip": [True, False],
                "enable_zip": [True, False],
                "enable_apacheconnector": [True, False],
@@ -60,6 +62,8 @@
                 "enable_data_sqlite": True,
                 "enable_data_mysql": False,
                 "enable_data_odbc": False,
+                "enable_encodings": True,
+                "enable_jwt": True,
                 "enable_sevenzip": False,
                 "enable_zip": True,
                 "enable_apacheconnector": False,
@@ -101,7 +105,8 @@
         if self.options.enable_netssl or \
            self.options.enable_netssl_win or \
            self.options.enable_crypto or \
-           self.options.force_openssl:
+           self.options.force_openssl or \
+           self.options.enable_jwt:
             self.requires.add("openssl/1.0.2t")
 
     def _patch(self):

{"golden_diff": "diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py\n--- a/recipes/poco/all/conanfile.py\n+++ b/recipes/poco/all/conanfile.py\n@@ -31,6 +31,8 @@\n                \"enable_data_sqlite\": [True, False],\n                \"enable_data_mysql\": [True, False],\n                \"enable_data_odbc\": [True, False],\n+               \"enable_encodings\": [True, False],\n+               \"enable_jwt\": [True, False],\n                \"enable_sevenzip\": [True, False],\n                \"enable_zip\": [True, False],\n                \"enable_apacheconnector\": [True, False],\n@@ -60,6 +62,8 @@\n                 \"enable_data_sqlite\": True,\n                 \"enable_data_mysql\": False,\n                 \"enable_data_odbc\": False,\n+                \"enable_encodings\": True,\n+                \"enable_jwt\": True,\n                 \"enable_sevenzip\": False,\n                 \"enable_zip\": True,\n                 \"enable_apacheconnector\": False,\n@@ -101,7 +105,8 @@\n         if self.options.enable_netssl or \\\n            self.options.enable_netssl_win or \\\n            self.options.enable_crypto or \\\n-           self.options.force_openssl:\n+           self.options.force_openssl or \\\n+           self.options.enable_jwt:\n             self.requires.add(\"openssl/1.0.2t\")\n \n     def _patch(self):\n", "issue": "[package] poco/1.10.1: Options not available / not correctly parsed\n### Package and Environment Details\r\n  * Package Name/Version: **poco/1.10.1**\r\n  * Operating System+version: **Windows 10 64-bit**\r\n  * Compiler+version: **Visual Studio 15**\r\n  * Conan version: **conan 1.22.2**\r\n  * Python version: **Python 3.7.1**\r\n\r\n---\r\n\r\nI'm currently setting up a Poco-example project with Conan and I'm basically disabling every option (project only relies on Poco::Foundation).\r\nHowever, when I use a list of options to disable, which also includes\r\n- `poco:enable_encodings=False`\r\n- `poco:enable_jwt=False`\r\n\r\nI get the errors:\r\n```\r\nERROR: poco/1.10.1: 'options.enable_encodings' doesn't exist\r\n```\r\nor\r\n```\r\nERROR: poco/1.10.1: 'options.enable_jwt' doesn't exist\r\n```\r\n\r\nLooking at the `conanfile.py` that totally makes sense since these options are not available. **Why is that?**\r\n\r\nHowever, If I use upper case options\r\n- `Poco:enable_encodings=False`\r\n- `Poco:enable_jwt=False`\r\n\r\nI don't get any error; all options that can be disabled are disabled after build and encodings and jwt (as well as depending libraries) are created.\r\n\r\nSo I guess if `poco` was written in lower case some kind of \"option-check\" is performed before building Poco. If `Poco` was written in upper case the check is not performed but the options are correctly sent to Conan.\r\n\r\nAdditionally I tested this by adding arbitrary options\r\n- `poco:enable_foobar=False`\r\n- `Poco:enable_foobar=False`\r\n\r\nBoth did not make any difference in detecting unsupported options.\r\n\r\nI think it would make sense to inform a user \r\n- if upper case namespace options are not available (`Poco:enable_encodings=False`)\r\n- if upper case / lower case options are not available at all (`poco:enable_foobar=False`)\n", "before_files": [{"content": "import os\n\nfrom conans import ConanFile, CMake, tools\nfrom conans.errors import ConanInvalidConfiguration\nfrom conans.tools import Version\n\n\nclass PocoConan(ConanFile):\n    name = \"poco\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    homepage = \"https://pocoproject.org\"\n    topics = (\"conan\", \"poco\", \"building\", \"networking\", \"server\", \"mobile\", \"embedded\")\n    exports_sources = \"CMakeLists.txt\"\n    generators = \"cmake\"\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    license = \"BSL-1.0\"\n    description = \"Modern, powerful open source C++ class libraries for building network- and internet-based \" \\\n                  \"applications that run on desktop, server, mobile and embedded systems.\"\n    options = {\"shared\": [True, False],\n               \"fPIC\": [True, False],\n               \"enable_xml\": [True, False],\n               \"enable_json\": [True, False],\n               \"enable_mongodb\": [True, False],\n               \"enable_pdf\": [True, False],\n               \"enable_util\": [True, False],\n               \"enable_net\": [True, False],\n               \"enable_netssl\": [True, False],\n               \"enable_netssl_win\": [True, False],\n               \"enable_crypto\": [True, False],\n               \"enable_data\": [True, False],\n               \"enable_data_sqlite\": [True, False],\n               \"enable_data_mysql\": [True, False],\n               \"enable_data_odbc\": [True, False],\n               \"enable_sevenzip\": [True, False],\n               \"enable_zip\": [True, False],\n               \"enable_apacheconnector\": [True, False],\n               \"enable_cppparser\": [True, False],\n               \"enable_pocodoc\": [True, False],\n               \"enable_pagecompiler\": [True, False],\n               \"enable_pagecompiler_file2page\": [True, False],\n               \"enable_redis\": [True, False],\n               \"force_openssl\": [True, False],\n               \"enable_tests\": [True, False],\n               \"poco_unbundled\": [True, False],\n               \"cxx_14\": [True, False]\n              }\n    default_options = {\n                \"shared\": False,\n                \"fPIC\": True,\n                \"enable_xml\": True,\n                \"enable_json\": True,\n                \"enable_mongodb\": True,\n                \"enable_pdf\": False,\n                \"enable_util\": True,\n                \"enable_net\": True,\n                \"enable_netssl\": True,\n                \"enable_netssl_win\": True,\n                \"enable_crypto\": True,\n                \"enable_data\": True,\n                \"enable_data_sqlite\": True,\n                \"enable_data_mysql\": False,\n                \"enable_data_odbc\": False,\n                \"enable_sevenzip\": False,\n                \"enable_zip\": True,\n                \"enable_apacheconnector\": False,\n                \"enable_cppparser\": False,\n                \"enable_pocodoc\": False,\n                \"enable_pagecompiler\": False,\n                \"enable_pagecompiler_file2page\": False,\n                \"enable_redis\": True,\n                \"force_openssl\": True,\n                \"enable_tests\": False,\n                \"poco_unbundled\": False,\n                \"cxx_14\": False\n            }\n\n    @property\n    def _source_subfolder(self):\n        return \"source_subfolder\"\n\n    @property\n    def _build_subfolder(self):\n        return \"build_subfolder\"\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        extracted_folder = \"poco-poco-{}-release\".format(self.version)\n        os.rename(extracted_folder, self._source_subfolder)\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.options.enable_apacheconnector:\n            raise ConanInvalidConfiguration(\"Apache connector not supported: https://github.com/pocoproject/poco/issues/1764\")\n        if self.options.enable_data_mysql:\n            raise ConanInvalidConfiguration(\"MySQL not supported yet, open an issue here please: %s\" % self.url)\n\n    def requirements(self):\n        if self.options.enable_netssl or \\\n           self.options.enable_netssl_win or \\\n           self.options.enable_crypto or \\\n           self.options.force_openssl:\n            self.requires.add(\"openssl/1.0.2t\")\n\n    def _patch(self):\n        if self.settings.compiler == \"Visual Studio\":\n            replace = \"POCO_INSTALL_PDB(${target_name})\"\n            tools.replace_in_file(os.path.join(self._source_subfolder, \"cmake\", \"PocoMacros.cmake\"), replace, \"# \" + replace)\n            if self.options.shared:\n                self.output.warn(\"Adding ws2_32 dependency...\")\n                replace = 'Net Util Foundation Crypt32.lib'\n                if Version(self.version) >= \"1.10.0\":\n                    replace = 'Poco::Net Poco::Util Crypt32.lib'\n                tools.replace_in_file(os.path.join(self._source_subfolder, \"NetSSL_Win\", \"CMakeLists.txt\"), replace, replace + \" ws2_32 \")\n\n                replace = 'Foundation ${OPENSSL_LIBRARIES}'\n                if Version(self.version) >= \"1.10.0\":\n                    replace = 'Poco::Foundation OpenSSL::SSL OpenSSL::Crypto'\n                tools.replace_in_file(os.path.join(self._source_subfolder, \"Crypto\", \"CMakeLists.txt\"), replace, replace + \" ws2_32 Crypt32.lib\")\n\n        # Poco 1.9.x - CMAKE_SOURCE_DIR is required in many places\n        os.rename(os.path.join(self._source_subfolder, \"CMakeLists.txt\"), os.path.join(self._source_subfolder, \"CMakeListsOriginal.cmake\"))\n        os.rename(\"CMakeLists.txt\", os.path.join(self._source_subfolder, \"CMakeLists.txt\"))\n\n    def _configure_cmake(self):\n        cmake = CMake(self, parallel=None)\n        for option_name in self.options.values.fields:\n            activated = getattr(self.options, option_name)\n            if option_name == \"shared\":\n                cmake.definitions[\"POCO_STATIC\"] = \"OFF\" if activated else \"ON\"\n            elif not option_name == \"fPIC\":\n                cmake.definitions[option_name.upper()] = \"ON\" if activated else \"OFF\"\n\n        cmake.definitions[\"CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP\"] = True\n        if self.settings.os == \"Windows\" and self.settings.compiler == \"Visual Studio\":  # MT or MTd\n            cmake.definitions[\"POCO_MT\"] = \"ON\" if \"MT\" in str(self.settings.compiler.runtime) else \"OFF\"\n        self.output.info(cmake.definitions)\n        cmake.configure(build_dir=self._build_subfolder, source_dir=os.path.join(\"..\", self._source_subfolder))\n        return cmake\n\n    def build(self):\n        self._patch()\n        cmake = self._configure_cmake()\n        cmake.build()\n\n    def package(self):\n        self.copy(\"LICENSE\", dst=\"licenses\", src=self._source_subfolder)\n        cmake = self._configure_cmake()\n        cmake.install()\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"cmake\"))\n        tools.rmdir(os.path.join(self.package_folder, \"cmake\"))\n\n    def package_info(self):\n        libs = [(\"enable_mongodb\", \"PocoMongoDB\"),\n                (\"enable_pdf\", \"PocoPDF\"),\n                (\"enable_netssl\", \"PocoNetSSL\"),\n                (\"enable_netssl_win\", \"PocoNetSSLWin\"),\n                (\"enable_net\", \"PocoNet\"),\n                (\"enable_crypto\", \"PocoCrypto\"),\n                (\"enable_data_sqlite\", \"PocoDataSQLite\"),\n                (\"enable_data_mysql\", \"PocoDataMySQL\"),\n                (\"enable_data_odbc\", \"PocoDataODBC\"),\n                (\"enable_data\", \"PocoData\"),\n                (\"enable_sevenzip\", \"PocoSevenZip\"),\n                (\"enable_zip\", \"PocoZip\"),\n                (\"enable_apacheconnector\", \"PocoApacheConnector\"),\n                (\"enable_util\", \"PocoUtil\"),\n                (\"enable_xml\", \"PocoXML\"),\n                (\"enable_json\", \"PocoJSON\"),\n                (\"enable_redis\", \"PocoRedis\")]\n\n        suffix = str(self.settings.compiler.runtime).lower()  \\\n                 if self.settings.compiler == \"Visual Studio\" and not self.options.shared \\\n                 else (\"d\" if self.settings.build_type==\"Debug\" else \"\")\n        for flag, lib in libs:\n            if getattr(self.options, flag):\n                if self.settings.os == \"Windows\" and flag == \"enable_netssl\" and self.options.enable_netssl_win:\n                    continue\n\n                if self.settings.os != \"Windows\" and flag == \"enable_netssl_win\":\n                    continue\n\n                self.cpp_info.libs.append(\"%s%s\" % (lib, suffix))\n\n        self.cpp_info.libs.append(\"PocoFoundation%s\" % suffix)\n\n        # in linux we need to link also with these libs\n        if self.settings.os == \"Linux\":\n            self.cpp_info.libs.extend([\"pthread\", \"dl\", \"rt\"])\n\n        if not self.options.shared:\n            self.cpp_info.defines.extend([\"POCO_STATIC=ON\", \"POCO_NO_AUTOMATIC_LIBS\"])\n            if self.settings.compiler == \"Visual Studio\":\n                self.cpp_info.libs.extend([\"ws2_32\", \"Iphlpapi\", \"Crypt32\"])\n        self.cpp_info.names[\"cmake_find_package\"] = \"Poco\"\n        self.cpp_info.names[\"cmake_find_package_multi\"] = \"Poco\"\n", "path": "recipes/poco/all/conanfile.py"}], "after_files": [{"content": "import os\n\nfrom conans import ConanFile, CMake, tools\nfrom conans.errors import ConanInvalidConfiguration\nfrom conans.tools import Version\n\n\nclass PocoConan(ConanFile):\n    name = \"poco\"\n    url = \"https://github.com/conan-io/conan-center-index\"\n    homepage = \"https://pocoproject.org\"\n    topics = (\"conan\", \"poco\", \"building\", \"networking\", \"server\", \"mobile\", \"embedded\")\n    exports_sources = \"CMakeLists.txt\"\n    generators = \"cmake\"\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n    license = \"BSL-1.0\"\n    description = \"Modern, powerful open source C++ class libraries for building network- and internet-based \" \\\n                  \"applications that run on desktop, server, mobile and embedded systems.\"\n    options = {\"shared\": [True, False],\n               \"fPIC\": [True, False],\n               \"enable_xml\": [True, False],\n               \"enable_json\": [True, False],\n               \"enable_mongodb\": [True, False],\n               \"enable_pdf\": [True, False],\n               \"enable_util\": [True, False],\n               \"enable_net\": [True, False],\n               \"enable_netssl\": [True, False],\n               \"enable_netssl_win\": [True, False],\n               \"enable_crypto\": [True, False],\n               \"enable_data\": [True, False],\n               \"enable_data_sqlite\": [True, False],\n               \"enable_data_mysql\": [True, False],\n               \"enable_data_odbc\": [True, False],\n               \"enable_encodings\": [True, False],\n               \"enable_jwt\": [True, False],\n               \"enable_sevenzip\": [True, False],\n               \"enable_zip\": [True, False],\n               \"enable_apacheconnector\": [True, False],\n               \"enable_cppparser\": [True, False],\n               \"enable_pocodoc\": [True, False],\n               \"enable_pagecompiler\": [True, False],\n               \"enable_pagecompiler_file2page\": [True, False],\n               \"enable_redis\": [True, False],\n               \"force_openssl\": [True, False],\n               \"enable_tests\": [True, False],\n               \"poco_unbundled\": [True, False],\n               \"cxx_14\": [True, False]\n              }\n    default_options = {\n                \"shared\": False,\n                \"fPIC\": True,\n                \"enable_xml\": True,\n                \"enable_json\": True,\n                \"enable_mongodb\": True,\n                \"enable_pdf\": False,\n                \"enable_util\": True,\n                \"enable_net\": True,\n                \"enable_netssl\": True,\n                \"enable_netssl_win\": True,\n                \"enable_crypto\": True,\n                \"enable_data\": True,\n                \"enable_data_sqlite\": True,\n                \"enable_data_mysql\": False,\n                \"enable_data_odbc\": False,\n                \"enable_encodings\": True,\n                \"enable_jwt\": True,\n                \"enable_sevenzip\": False,\n                \"enable_zip\": True,\n                \"enable_apacheconnector\": False,\n                \"enable_cppparser\": False,\n                \"enable_pocodoc\": False,\n                \"enable_pagecompiler\": False,\n                \"enable_pagecompiler_file2page\": False,\n                \"enable_redis\": True,\n                \"force_openssl\": True,\n                \"enable_tests\": False,\n                \"poco_unbundled\": False,\n                \"cxx_14\": False\n            }\n\n    @property\n    def _source_subfolder(self):\n        return \"source_subfolder\"\n\n    @property\n    def _build_subfolder(self):\n        return \"build_subfolder\"\n\n    def source(self):\n        tools.get(**self.conan_data[\"sources\"][self.version])\n        extracted_folder = \"poco-poco-{}-release\".format(self.version)\n        os.rename(extracted_folder, self._source_subfolder)\n\n    def config_options(self):\n        if self.settings.os == \"Windows\":\n            del self.options.fPIC\n\n    def configure(self):\n        if self.options.enable_apacheconnector:\n            raise ConanInvalidConfiguration(\"Apache connector not supported: https://github.com/pocoproject/poco/issues/1764\")\n        if self.options.enable_data_mysql:\n            raise ConanInvalidConfiguration(\"MySQL not supported yet, open an issue here please: %s\" % self.url)\n\n    def requirements(self):\n        if self.options.enable_netssl or \\\n           self.options.enable_netssl_win or \\\n           self.options.enable_crypto or \\\n           self.options.force_openssl or \\\n           self.options.enable_jwt:\n            self.requires.add(\"openssl/1.0.2t\")\n\n    def _patch(self):\n        if self.settings.compiler == \"Visual Studio\":\n            replace = \"POCO_INSTALL_PDB(${target_name})\"\n            tools.replace_in_file(os.path.join(self._source_subfolder, \"cmake\", \"PocoMacros.cmake\"), replace, \"# \" + replace)\n            if self.options.shared:\n                self.output.warn(\"Adding ws2_32 dependency...\")\n                replace = 'Net Util Foundation Crypt32.lib'\n                if Version(self.version) >= \"1.10.0\":\n                    replace = 'Poco::Net Poco::Util Crypt32.lib'\n                tools.replace_in_file(os.path.join(self._source_subfolder, \"NetSSL_Win\", \"CMakeLists.txt\"), replace, replace + \" ws2_32 \")\n\n                replace = 'Foundation ${OPENSSL_LIBRARIES}'\n                if Version(self.version) >= \"1.10.0\":\n                    replace = 'Poco::Foundation OpenSSL::SSL OpenSSL::Crypto'\n                tools.replace_in_file(os.path.join(self._source_subfolder, \"Crypto\", \"CMakeLists.txt\"), replace, replace + \" ws2_32 Crypt32.lib\")\n\n        # Poco 1.9.x - CMAKE_SOURCE_DIR is required in many places\n        os.rename(os.path.join(self._source_subfolder, \"CMakeLists.txt\"), os.path.join(self._source_subfolder, \"CMakeListsOriginal.cmake\"))\n        os.rename(\"CMakeLists.txt\", os.path.join(self._source_subfolder, \"CMakeLists.txt\"))\n\n    def _configure_cmake(self):\n        cmake = CMake(self, parallel=None)\n        for option_name in self.options.values.fields:\n            activated = getattr(self.options, option_name)\n            if option_name == \"shared\":\n                cmake.definitions[\"POCO_STATIC\"] = \"OFF\" if activated else \"ON\"\n            elif not option_name == \"fPIC\":\n                cmake.definitions[option_name.upper()] = \"ON\" if activated else \"OFF\"\n\n        cmake.definitions[\"CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP\"] = True\n        if self.settings.os == \"Windows\" and self.settings.compiler == \"Visual Studio\":  # MT or MTd\n            cmake.definitions[\"POCO_MT\"] = \"ON\" if \"MT\" in str(self.settings.compiler.runtime) else \"OFF\"\n        self.output.info(cmake.definitions)\n        cmake.configure(build_dir=self._build_subfolder, source_dir=os.path.join(\"..\", self._source_subfolder))\n        return cmake\n\n    def build(self):\n        self._patch()\n        cmake = self._configure_cmake()\n        cmake.build()\n\n    def package(self):\n        self.copy(\"LICENSE\", dst=\"licenses\", src=self._source_subfolder)\n        cmake = self._configure_cmake()\n        cmake.install()\n        tools.rmdir(os.path.join(self.package_folder, \"lib\", \"cmake\"))\n        tools.rmdir(os.path.join(self.package_folder, \"cmake\"))\n\n    def package_info(self):\n        libs = [(\"enable_mongodb\", \"PocoMongoDB\"),\n                (\"enable_pdf\", \"PocoPDF\"),\n                (\"enable_netssl\", \"PocoNetSSL\"),\n                (\"enable_netssl_win\", \"PocoNetSSLWin\"),\n                (\"enable_net\", \"PocoNet\"),\n                (\"enable_crypto\", \"PocoCrypto\"),\n                (\"enable_data_sqlite\", \"PocoDataSQLite\"),\n                (\"enable_data_mysql\", \"PocoDataMySQL\"),\n                (\"enable_data_odbc\", \"PocoDataODBC\"),\n                (\"enable_data\", \"PocoData\"),\n                (\"enable_sevenzip\", \"PocoSevenZip\"),\n                (\"enable_zip\", \"PocoZip\"),\n                (\"enable_apacheconnector\", \"PocoApacheConnector\"),\n                (\"enable_util\", \"PocoUtil\"),\n                (\"enable_xml\", \"PocoXML\"),\n                (\"enable_json\", \"PocoJSON\"),\n                (\"enable_redis\", \"PocoRedis\")]\n\n        suffix = str(self.settings.compiler.runtime).lower()  \\\n                 if self.settings.compiler == \"Visual Studio\" and not self.options.shared \\\n                 else (\"d\" if self.settings.build_type==\"Debug\" else \"\")\n        for flag, lib in libs:\n            if getattr(self.options, flag):\n                if self.settings.os == \"Windows\" and flag == \"enable_netssl\" and self.options.enable_netssl_win:\n                    continue\n\n                if self.settings.os != \"Windows\" and flag == \"enable_netssl_win\":\n                    continue\n\n                self.cpp_info.libs.append(\"%s%s\" % (lib, suffix))\n\n        self.cpp_info.libs.append(\"PocoFoundation%s\" % suffix)\n\n        # in linux we need to link also with these libs\n        if self.settings.os == \"Linux\":\n            self.cpp_info.libs.extend([\"pthread\", \"dl\", \"rt\"])\n\n        if not self.options.shared:\n            self.cpp_info.defines.extend([\"POCO_STATIC=ON\", \"POCO_NO_AUTOMATIC_LIBS\"])\n            if self.settings.compiler == \"Visual Studio\":\n                self.cpp_info.libs.extend([\"ws2_32\", \"Iphlpapi\", \"Crypt32\"])\n        self.cpp_info.names[\"cmake_find_package\"] = \"Poco\"\n        self.cpp_info.names[\"cmake_find_package_multi\"] = \"Poco\"\n", "path": "recipes/poco/all/conanfile.py"}]}