{"id":29623924,"url":"https://github.com/mikemitterer/cmake-dart-extension-master","last_synced_at":"2026-06-17T21:31:45.687Z","repository":{"id":36895385,"uuid":"41202388","full_name":"MikeMitterer/cmake-dart-extension-master","owner":"MikeMitterer","description":null,"archived":false,"fork":false,"pushed_at":"2016-12-31T00:20:25.000Z","size":1840,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-16T06:44:14.909Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MikeMitterer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-08-22T10:27:51.000Z","updated_at":"2018-04-26T04:20:14.000Z","dependencies_parsed_at":"2022-09-02T03:51:02.718Z","dependency_job_id":null,"html_url":"https://github.com/MikeMitterer/cmake-dart-extension-master","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/MikeMitterer/cmake-dart-extension-master","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fcmake-dart-extension-master","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fcmake-dart-extension-master/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fcmake-dart-extension-master/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fcmake-dart-extension-master/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MikeMitterer","download_url":"https://codeload.github.com/MikeMitterer/cmake-dart-extension-master/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MikeMitterer%2Fcmake-dart-extension-master/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266242072,"owners_count":23898102,"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":"2025-07-21T05:08:27.366Z","updated_at":"2026-06-17T21:31:45.658Z","avatar_url":"https://github.com/MikeMitterer.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cmake-dart-extension-master\n\u003e A quick and simple example for using CMAKE to build Dart native extension.\n\nIt is essentially for my own usage, but I'd be happy if it is useful to someone else.\nI am open to improvement and contributions.\n\nThis project creates the Dart package [native_sample](https://pub.dartlang.org/packages/native_sample)\n\n## Original Dart Documentation    \nBecause it is so outdated [2012](https://www.dartlang.org/articles/dart-vm/native-extensions) I try\nto collect some useful information's here on [CPP-Master](https://github.com/MikeMitterer/cmake-dart-extension-master)\n\nIf you have some tips, tricks or other useful information's please file an issue report\nor add something to the [Wiki](https://github.com/MikeMitterer/cmake-dart-extension-master/wiki)! - **Thanks!**   \n\n## Prepare your machine to build the LIB\n\nThis project uses \"Config\" and \"configDart\" CMake-File for configuration. You can \nfind these file as usual on [GitHub](https://github.com/MikeMitterer/cmake)\n\n```cmake\n    cmake_minimum_required(VERSION 3.6)\n    \n    # ENV is defined in .bashrc\n    #   ( cmake-configs on GH: https://github.com/MikeMitterer/cmake)\n    set(CMAKE_MODULE_PATH $ENV{CMAKE_MODULE_PATH} ${CMAKE_MODULE_PATH})\n    \n    # ┌──────────────────────────────────────────────────────────────────┐\n    # │  Projects Settings                                               │\n    # └──────────────────────────────────────────────────────────────────┘\n    \n    project(sample_extension)\n    \n    # Output bin, c++11 usw\n    include(Config)\n    \n    # Only necessary if this module has QT-Siblings\n    set(CMAKE_AUTOMOC OFF)\n    \n    # ┌──────────────────────────────────────────────────────────────────┐\n    # │  Dart (Make sure you have '-std=c++11' for CMAKE_CXX_FLAGS       │\n    # └──────────────────────────────────────────────────────────────────┘\n    \n    include(configDart)\n    #...\n```\n\n## Prerequisites \n   - cmake\n   - clang (I'm using clang 8 on Mac and 3.8 on Linux)\n   - Dart\n\n## What to do next\n   - Go to [https://github.com/MikeMitterer/cmake-dart-extension-master](https://github.com/MikeMitterer/cmake-dart-extension-master)  \n   Clone the repo\n      \n   - Go to [https://github.com/MikeMitterer/cmake](https://github.com/MikeMitterer/cmake)  \n   Clone the repo (You need Config.cmake, configDart.cmake and FindSpdlog.cmake)\n             \n   - Add the cmake-folder to your CMAKE_MODULE_PATH\n   Something like this:  \n      \n         \n        export DEVCPP=\"/Volumes/Daten/DevLocal/DevCPP\"\n        export CMAKE_MODULE_PATH=\"${DEVCPP}/cmake\"\n   \n   - cd to \"cmake-dart-extension-master\"    \n   We add dependencies to spdlog. If you want to know why I use this approach - check\n   out this website [Dependency management for C++ with CMake and Git](https://foonathan.github.io/blog/2016/07/07/cmake-dependency-handling.html)\n   \n     - mkdir .dependencies\n   \n     - cd .dependencies\n     git submodule add https://github.com/gabime/spdlog\n   \n     - cd back to cmake-dart-extensions-master\n     git submodule update --init -- .dependencies/spdlog\n    \n   \n   - mkdir \"build\" (If it does not already exist)   \n   If it exists - `rm -f build \u0026\u0026 mkdir build \u0026\u0026 cd build \u0026\u0026 cmake .. \u0026\u0026 make`   \n   \n   **This should build the native lib on your system and copy it to _dart/lib/native_ ** \n\n### Why spdlog\nI am just curios how it plays together with Dart + native extensions...          \n    \n    \n### Hint\nCheck out [entr](http://entrproject.org/)  \n \n_cmake-dart-extension-master $_\n```bash\n    ls * | entr sh -c \"cd dart; dart bin/random.dart\"\n```\nEvery time a file in cmake-dart-extension-master changes \"entr\" executes `dart bin/random.dart` - nice for testing!\n     \n     \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikemitterer%2Fcmake-dart-extension-master","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikemitterer%2Fcmake-dart-extension-master","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikemitterer%2Fcmake-dart-extension-master/lists"}