From 45245aac321dab082a427829a70808228d2eab5d Mon Sep 17 00:00:00 2001 From: Andreas Stefl Date: Sun, 26 Jul 2026 12:48:37 +0200 Subject: [PATCH] build: let conan consumers turn the cli off The cli tools were built and installed with every conan package: the recipe never passed `ODR_CLI` through, so a consumer that only links the library (the mobile apps) had no way to skip them. Add a `with_cli` option for it. Also install `server` alongside the other cli tools when the http server is enabled - it was built and then dropped at install time. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01Xej6xnQnMAYdQ1pwTaWXxy --- CMakeLists.txt | 3 +++ conanfile.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 04bde5b7f..310a42244 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -436,6 +436,9 @@ install( set(ODR_INSTALL_TARGETS odr) if (ODR_CLI) list(APPEND ODR_INSTALL_TARGETS meta translate back_translate) + if (ODR_WITH_HTTP_SERVER) + list(APPEND ODR_INSTALL_TARGETS server) + endif () endif () install( TARGETS ${ODR_INSTALL_TARGETS} diff --git a/conanfile.py b/conanfile.py index 1da404181..f5a750ae8 100644 --- a/conanfile.py +++ b/conanfile.py @@ -21,6 +21,7 @@ class OpenDocumentCoreConan(ConanFile): "with_wvWare": [True, False], "with_libmagic": [True, False], "with_http_server": [True, False], + "with_cli": [True, False], "with_python": [True, False], "with_jni": [True, False], "bundle_assets": [True, False], @@ -32,6 +33,7 @@ class OpenDocumentCoreConan(ConanFile): "with_wvWare": True, "with_libmagic": True, "with_http_server": True, + "with_cli": True, "with_python": False, "with_jni": False, "bundle_assets": False, @@ -85,6 +87,7 @@ def generate(self): tc.variables["ODR_WITH_WVWARE"] = self.options.get_safe("with_wvWare", False) tc.variables["ODR_WITH_LIBMAGIC"] = self.options.get_safe("with_libmagic", False) tc.variables["ODR_WITH_HTTP_SERVER"] = self.options.get_safe("with_http_server", False) + tc.variables["ODR_CLI"] = self.options.get_safe("with_cli", True) tc.variables["ODR_PYTHON"] = self.options.get_safe("with_python", False) tc.variables["ODR_JNI"] = self.options.get_safe("with_jni", False) tc.variables["ODR_BUNDLE_ASSETS"] = self.options.get_safe("bundle_assets", False)