{"id":16163966,"url":"https://github.com/rawleyfowler/distribution-builder-cmake","last_synced_at":"2025-04-07T04:45:17.885Z","repository":{"id":132530464,"uuid":"593393721","full_name":"rawleyfowler/Distribution-Builder-Cmake","owner":"rawleyfowler","description":"A simple builder for C/C++ project FFI with Raku and CMake","archived":false,"fork":false,"pushed_at":"2023-02-15T14:42:40.000Z","size":33,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T08:54:22.817Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rawleyfowler.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","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-01-25T22:18:54.000Z","updated_at":"2023-11-12T17:56:33.000Z","dependencies_parsed_at":"2023-05-17T03:30:29.261Z","dependency_job_id":null,"html_url":"https://github.com/rawleyfowler/Distribution-Builder-Cmake","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/rawleyfowler%2FDistribution-Builder-Cmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawleyfowler%2FDistribution-Builder-Cmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawleyfowler%2FDistribution-Builder-Cmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rawleyfowler%2FDistribution-Builder-Cmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rawleyfowler","download_url":"https://codeload.github.com/rawleyfowler/Distribution-Builder-Cmake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595374,"owners_count":20963942,"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":[],"created_at":"2024-10-10T02:44:54.709Z","updated_at":"2025-04-07T04:45:17.869Z","avatar_url":"https://github.com/rawleyfowler.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"Distribution::Builder::Cmake\n====\nA dead simple way to build a CMake project for FFI with Raku.\n\n[![Actions Status](https://github.com/rawleyfowler/Distribution-Builder-Cmake/actions/workflows/test.yml/badge.svg)](https://github.com/rawleyfowler/Distribution-Builder-Cmake/actions)\n\nSynopsis\n========\n\nInstallation\n=========\n```shell\nzef install Distribution::Builder::Cmake\n```\n\nUsage\n=========\nAssuming your Raku project keeps its CMake project in a folder called `my-cmake-project`, and your exported lib is `my-lib`. \nNote, the final `.so` file will be `libmy-lib.so`.\nIn your `META6.json` you'll add the following:\n```\n{ \n    ...\n    \"builder\": \"Distribution::Builder::Cmake\",\n    \"build\": {\n        \"lib\": \"my-lib\",\n        \"src-dir\": \"my-cmake-project\"\n    }\n    ...\n}\n```\n\n**Note**: You may also provide a `install` field to specify the directory to install the library. This defaults to: `resources/libraries/lib\u003cyour-lib\u003e.so`\n\nThe typical CMake project will look like (assuming your lib is `my-lib`):\n```cmake\ncmake_minimum_required(VERSION 3.9)\nproject(my-lib VERSION 1.0.0 DESCRIPTION \"My lib!\")\nadd_library(my-lib SHARED my-lib.cc)\nset_target_properties(my-lib PROPERTIES VERSION ${PROJECT_VERSION})\nset_target_properties(my-lib PROPERTIES SOVERSION 1)\nset_target_properties(my-lib PROPERTIES PUBLIC_HEADER my-lib.hh)\ntarget_include_directories(my-lib PRIVATE .)\ninstall(TARGETS my-lib\n\tLIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}\n\tPUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})\n```\n\nYou can see an example of this in action in [this repo](https://github.com/rawleyfowler/Raku-Cpp-Example)\n\n(Obviously, you'll need Make and CMake installed)\n\nAuthor\n======\n\n    \u003cRawley Fowler\u003e\n\nCOPYRIGHT AND LICENSE\n=====================\n\nCopyright 2023 \n\nThis library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawleyfowler%2Fdistribution-builder-cmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frawleyfowler%2Fdistribution-builder-cmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frawleyfowler%2Fdistribution-builder-cmake/lists"}