{"id":20841690,"url":"https://github.com/scapix-com/cmodule","last_synced_at":"2025-05-08T22:25:04.338Z","repository":{"id":87661238,"uuid":"248087323","full_name":"scapix-com/cmodule","owner":"scapix-com","description":"Non-intrusive CMake dependency management","archived":false,"fork":false,"pushed_at":"2025-04-10T23:12:11.000Z","size":106,"stargazers_count":22,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T23:29:59.342Z","etag":null,"topics":["boost","cmake","cplusplus","cpp","package","package-management","package-manager"],"latest_commit_sha":null,"homepage":"https://www.scapix.com","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scapix-com.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2020-03-17T22:40:24.000Z","updated_at":"2025-04-10T23:12:15.000Z","dependencies_parsed_at":"2023-03-05T16:00:25.073Z","dependency_job_id":"9eeb8290-7741-43c5-bb32-fbfa742fb0ec","html_url":"https://github.com/scapix-com/cmodule","commit_stats":null,"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fcmodule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fcmodule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fcmodule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scapix-com%2Fcmodule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scapix-com","download_url":"https://codeload.github.com/scapix-com/cmodule/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253156406,"owners_count":21862909,"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":["boost","cmake","cplusplus","cpp","package","package-management","package-manager"],"created_at":"2024-11-18T01:21:19.262Z","updated_at":"2025-05-08T22:25:04.260Z","avatar_url":"https://github.com/scapix-com.png","language":"CMake","readme":"﻿# cmodule\n\n🇺🇦 If you like this project, please consider donating to one of the funds helping victims of russian aggression against Ukraine: [ukraine.ua](https://war.ukraine.ua/donate/)\n\nNon-intrusive CMake dependency management.\n\nNormally CMake's find_package() looks for packages installed on host system (and compiled for host system).\nWhen using **cmodule**, find_package() downloads packages and compiles them using current CMake toolchain.\nThis allows using C/C++ libraries (like boost) whether you are building for host system or cross-compiling for Android, iOS, WebAssembly, etc.\n\n## CMake integration\n\nAfter initializing cmodule, regular find_package() calls will work in top level CMake project and all subprojects:\n\n```cmake\ninclude(FetchContent)\nFetchContent_Declare(\n  cmodule\n  URL \"https://github.com/scapix-com/cmodule/archive/refs/tags/v2.0.1.tar.gz\"\n  URL_HASH SHA256=a9477bbefb43b6fabdc2dc044207fe42cca63999c60b6baf06ba0c62fa116ec5\n)\nFetchContent_MakeAvailable(cmodule)\n\nfind_package(Boost REQUIRED COMPONENTS filesystem)\ntarget_link_libraries(mytarget PUBLIC Boost::filesystem)\n\nfind_package(Boost REQUIRED COMPONENTS iostreams)\ntarget_link_libraries(mytarget PUBLIC Boost::iostreams)\n\nfind_package(ZLIB REQUIRED)\ntarget_link_libraries(mytarget PRIVATE ZLIB::ZLIB)\n\nfind_package(BZip2 REQUIRED)\ntarget_link_libraries(mytarget PRIVATE BZip2::BZip2)\n\nfind_package(CURL REQUIRED)\ntarget_link_libraries(mytarget PRIVATE CURL::libcurl)\n```\n\n## How cmodule differs from other package managers?\n\nInstead of providing compiled binaries, cmodule builds libraries as part of your project build.\n\nThis has multiple advantages:\n\n- libraries seamlessly build for any target, including cross-compiling targets (iOS, Android, etc.)\n- libraries build using the same settings (compiler options) as the rest of the project\n- non intrusive syntax: automatically works for projects with regular find_package() calls\n- downloaded and extracted sources are cached by cmodule to speedup builds for different targets and builds of different projects\n\n## More info\n\n[Documentation](https://www.scapix.com/cmodule)\\\n[Example](https://github.com/scapix-com/cmodule_test)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscapix-com%2Fcmodule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscapix-com%2Fcmodule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscapix-com%2Fcmodule/lists"}