{"id":15136900,"url":"https://github.com/vvvar/juce-conan","last_synced_at":"2025-10-23T11:31:56.848Z","repository":{"id":151922419,"uuid":"622311532","full_name":"vvvar/juce-conan","owner":"vvvar","description":"Unofficial Conan 2.0 recipe for JUCE Framework","archived":false,"fork":false,"pushed_at":"2023-04-10T12:42:24.000Z","size":24,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-30T18:38:09.682Z","etag":null,"topics":["conan","conan-recipe","juce","juce-framework"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vvvar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-04-01T18:26:16.000Z","updated_at":"2024-06-07T14:03:38.000Z","dependencies_parsed_at":"2023-05-16T13:45:11.174Z","dependency_job_id":null,"html_url":"https://github.com/vvvar/juce-conan","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvvar%2Fjuce-conan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvvar%2Fjuce-conan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvvar%2Fjuce-conan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvvar%2Fjuce-conan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvvar","download_url":"https://codeload.github.com/vvvar/juce-conan/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237821666,"owners_count":19371802,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["conan","conan-recipe","juce","juce-framework"],"created_at":"2024-09-26T06:41:44.218Z","updated_at":"2025-10-23T11:31:56.490Z","avatar_url":"https://github.com/vvvar.png","language":"Python","readme":"# JUCE 7 Unofficial Conan 2.0 Recipe\n\nThis repository contains a recipe that makes [JUCE 7](https://juce.com) available as [Conan 2.0](https://docs.conan.io/2/) Package.\n\n## Pre-requisites\n\nInstall:\n- [Conan 2.0.2+](https://docs.conan.io/2/installation.html)\n\nRead:\n- [Conan 2.0 Getting Started](https://docs.conan.io/2/tutorial/consuming_packages.html)\n- [JUCE Cmake Documentation](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md)\n\n## How to use\n\n1. Create JUCE Conan Package with desired options(see all available options in [How to configure](#how-to-configure) chapter):\n```sh\n$ conan create . --options build_extras=True\n```\n\n2. Add it as a requirement in your Conan project:\n```python\n# conanfile.py\nfrom conan import ConanFile\nfrom conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout\n\nclass MyProject(ConanFile):\n    name = \"MyPlugin\"\n    version = \"0.4.2\"\n    user = \"octocat\"\n    channel = \"testing\"\n    settings = \"os\", \"arch\", \"compiler\", \"build_type\"\n\n    requires = \"juce/7.0.5@juce/release\" # Require JUCE\n    default_options = {                  # Configure it\n        \"juce/*:build_extras\": True\n    }\n\n    def layout(self):\n        cmake_layout(self)\n\n    def generate(self): \n        toolchain = CMakeToolchain(self)\n        toolchain.generate()\n        dependencies = CMakeDeps(self)\n        dependencies.generate()\n\n    def build(self):\n        cmake = CMake(self)\n        cmake.configure()\n        cmake.build()\n```\n\n3. Add it to your `CMakeList.txt`. Similar to the [find package approach](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md#using-find_package):\n```cmake\n# CMakeList.txt\nproject(MyPlugin)\n\n# Place it early, after `project()`\nfind_package(JUCE CONFIG REQUIRED)\n\n# You can use standard JUCE CMake functions\njuce_add_plugin(MyPlugin\n    PLUGIN_MANUFACTURER_CODE Ocat\n    PLUGIN_CODE Ocode\n    LV2URI \"https://example.com\"\n    FORMATS AU VST3 LV2 Standalone\n    VST3_CATEGORIES Fx Distortion Dynamics\n    AU_MAIN_TYPE kAudioUnitType_Effect\n    COMPANY_NAME \"octocompany\"\n    PRODUCT_NAME \"MyPlugin\"\n\n# Just as normal JUCE CMake project\ntarget_sources(MyPlugin\n    PRIVATE\n    Source/PluginEditor.cpp\n    Source/PluginProcessor.cpp)\n\n# And link with JUCE libraries\ntarget_link_libraries(MyPlugin\n    PRIVATE\n    juce::juce_dsp\n    juce::juce_audio_utils\n    juce::juce_audio_plugin_client\n    PUBLIC\n    juce::juce_recommended_config_flags\n    juce::juce_recommended_lto_flags\n    juce::juce_recommended_warning_flags)\n```\n\n4. Build as a normal Conan project:\n```sh\n$ conan install . \u0026\u0026 conan build .\n```\n\n## How to configure\n\nAll options of this recipe are just proxies for [already existing JUCE CMake Build Options](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md#options):\n- `build_extras` corresponds to [`JUCE_BUILD_EXTRAS`](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md#juce_build_extras)\n- `build_examples` corresponds to [`JUCE_BUILD_EXAMPLES`](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md#juce_build_examples)\n- `enable_module_source_groups` corresponds to [`JUCE_BUILD_EXAMPLES`](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md#juce_build_examples)\n- `copy_plugin_after_build` corresponds to [`JUCE_COPY_PLUGIN_AFTER_BUILD`](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md#juce_copy_plugin_after_build)\n\nAll defaults follow the same rules as in JUCE. For example, if you haven't provided `build_extras` then Conan will set it to `False`, just as JUCE does.\n\n## How does it work\n1. Get the tagged version of JUCE that matches with version of this recipe\n2. Translate Conan Options into [JUCE CMake Options](https://github.com/juce-framework/JUCE/blob/master/docs/CMake%20API.md#options)\n3. Disable Conan's `XXXConfig.cmake` generation feature and force it to use the original `JUCEConfig.cmake` generated by JUCE\n3. Build it and store it in the cache\n\n## Versioning\nThis recipe follows the same versioning scheme as JUCE. This means that `7.0.5` version of this recipe corresponds to [`7.0.5 version of JUCE`](https://github.com/juce-framework/JUCE/releases/tag/7.0.5).\n\n## Tips \u0026 Troubleshooting\n\n### How can I change the CMake generator?\n\nBy default, Conan will ask CMake to use `Unix Makefiles` generator. You can change that by configuring `CMakeToolchain` in your `conanfile.py`. For example, if you want to use `Visual Studio 17 2022` for Windows and `Ninja` for everything else, then you need to modify your `def generate(self)`:` as follows: \n```python\n    def generate(self): \n        toolchain = CMakeToolchain(self)\n        if self.settings.os == \"Windows\":\n            toolchain.generator = \"Visual Studio 17 2022\"\n        else:\n            toolchain.generator = \"Ninja\"\n```\n\n### I'm receiving `Missing prebuilt package` while building my project\n\nIf you're receiving this error:\n```sh\nERROR: Missing prebuilt package for 'juce/7.0.5@juce/release'\n```\nthen it means that you haven't built JUCE Conan Package with the correct options/settings.\nFor example, you've built it with `build_extras=False`:\n```sh\n$ conan create . --options build_extras=False\n```\nbut in your project, it is required with `build_extras=True`:\n```python\n# conanfile.py\n    requires = \"juce/7.0.5@juce/release\"\n    default_options = {\n        \"juce/*:build_extras\": True # \u003c-- Here, should match\n    }\n```\nTherefore, Conan would not be able to find a pre-build JUCE Conan Package in your cache because settings/options in your cache and your requirements should 1-1 match(see the [detailed explanation from Conan Docs](https://docs.conan.io/2/knowledge/faq.html?highlight=settings#error-missing-prebuilt-package)).\nThus, you should either create JUCE Conan Package with the correct options/settings:\n```sh\n$ conan create . --options build_extras=True\n```\nor, in your project, explicitly state that you'd like to build missing dependencies from the sources:\n```sh\n$ conan install . --build=missing \u0026\u0026 conan build .\n``` ","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvvar%2Fjuce-conan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvvar%2Fjuce-conan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvvar%2Fjuce-conan/lists"}