james94 commented on code in PR #1793:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1793#discussion_r1718944100


##########
conanfile.py:
##########
@@ -0,0 +1,115 @@
+from conan import ConanFile
+from conan.tools.env import VirtualRunEnv
+from conan.tools.cmake import CMake, CMakeToolchain
+from conan.tools.files import collect_libs, copy
+import os
+
+required_conan_version = ">=2.0"
+
+shared_requires = ("openssl/3.2.1", "libcurl/8.6.0", "civetweb/1.16", 
"libxml2/2.12.6",
+                   "catch2/3.5.4", "fmt/10.2.1", "spdlog/1.14.0")
+
+shared_sources = ("CMakeLists.txt", "libminifi/*", "extensions/*", 
"minifi_main/*", "nanofi/*",
+                  "bin/*", "bootstrap/*", "cmake/*", "conf/*", "controller/*", 
"encrypt-config/*",
+                  "etc/*", "examples/*", "msi/*", "thirdparty/*", "docker/*", 
"LICENSE", "NOTICE", 
+                  "README.md", "C2.md", "CONFIGURE.md", "CONTRIBUTING.md", 
"CONTROLLERS.md", "EXPRESSIONS.md",
+                  "Extensions.md", "JNI.md", "METRICS.md", "OPS.md", 
"PROCESSORS.md", "ThirdParties.md", 
+                  "Windows.md", "aptitude.sh", "arch.sh", "bootstrap.sh", 
"bstrp_functions.sh", "centos.sh",
+                  "CPPLINT.cfg", "darwin.sh", "debian.sh", "deploy.sh", 
"fedora.sh", "generateVersion.sh",
+                  "linux.sh", "rheldistro.sh", "run_clang_tidy.sh", 
"run_clang_tidy.sh", "run_flake8.sh",
+                  "run_shellcheck.sh", "suse.sh", "versioninfo.rc.in")
+
+class MiNiFiCppMain(ConanFile):
+    name = "minifi-cpp"
+    version = "0.99.1"
+    license = "Apache-2.0"
+    requires = shared_requires
+    settings = "os", "compiler", "build_type", "arch"
+    generators = "CMakeDeps"
+    options = {"shared": [True, False], "fPIC": [True, False]}
+
+    default_options = {"shared": False, "fPIC": True,}
+
+    exports_sources = shared_sources
+
+    def generate(self):
+        tc = CMakeToolchain(self)
+
+        tc.variables["MINIFI_LIBCURL_SOURCE"] = "CONAN"
+        tc.variables["MINIFI_OPENSSL_SOURCE"] = "CONAN"
+        tc.variables["MINIFI_ZLIB_SOURCE"] = "CONAN"
+        tc.variables["MINIFI_CIVETWEB_SOURCE"] = "CONAN"
+        tc.variables["MINIFI_LIBXML2_SOURCE"] = "CONAN"
+        tc.variables["MINIFI_CATCH2_SOURCE"] = "CONAN"
+        tc.variables["MINIFI_FMT_SOURCE"] = "CONAN"
+        tc.variables["MINIFI_SPDLOG_SOURCE"] = "CONAN"
+
+        tc.variables["SKIP_TESTS"] = "OFF"
+        tc.variables["ENABLE_OPENWSMAN"] = "ON"
+        tc.variables["ENABLE_CIVET"] = "ON"
+        tc.variables["ENABLE_EXPRESSION_LANGUAGE"] = "ON"
+        tc.variables["ENABLE_BZIP2"] = "ON"
+        tc.variables["ENABLE_ROCKSDB"] = "ON"
+        tc.variables["BUILD_ROCKSDB"] = "ON"
+
+        tc.variables["ENABLE_LIBARCHIVE"] = "OFF"

Review Comment:
   I updated the conanfile.py, so for more features, we go with MiNiFi C++'s 
default settings and now only these particular features are DISABLED:
   
   ~~~python
           tc.variables["ENABLE_LIBARCHIVE"] = "OFF"
           tc.variables["ENABLE_AWS"] = "OFF"
           tc.variables["ENABLE_SQL"] = "OFF"
           tc.variables["ENABLE_GCP"] = "OFF"
           tc.variables["ENABLE_LUA_SCRIPTING"] = "OFF"
   ~~~
   
   In a follow up PR, I will add support for ENABLING them using conan while 
still providing support for standalone CMake.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to