Let conan consumers turn the cli off - #620
Merged
Merged
Conversation
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xej6xnQnMAYdQ1pwTaWXxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 Generated with Claude Code
Why
Follow-up to feedback from OpenDocument.ios#125:
The install half of that is already fixed on
main(ODR_INSTALL_TARGETS, since 5.7.0). What is still missing is that nothing could setODR_CLIin the first place through conan: the recipe never passed it to CMake, so every package builds and installsmeta,translate,back_translateandserver— dead weight for a consumer that only links the library, and on iOS theservertool has to be linked against frameworks the app has no other use for.What
conanfile.py:with_clioption, defaultTrue, wired toODR_CLI.CMakeLists.txt: installserverwith the other cli tools whenODR_WITH_HTTP_SERVERis on. It was being built and then dropped at install time.The consumer-side counterpart is conan-odr-index#113 — the recipe the apps actually resolve.
Verified
Configured both ways against the existing conan toolchain and read back
cmake_install.cmake:-DODR_CLI=OFF→ headers,libodr.a, data dir only-DODR_CLI=ON -DODR_WITH_HTTP_SERVER=ON→bin/meta,bin/translate,bin/back_translate,bin/server