diff --git a/docs/assets/js/zzzz-search-data.json b/docs/assets/js/zzzz-search-data.json deleted file mode 100644 index e77b13e..0000000 --- a/docs/assets/js/zzzz-search-data.json +++ /dev/null @@ -1,72 +0,0 @@ ---- -permalink: /assets/js/search-data.json ---- -{ -{%- assign i = 0 -%} -{%- assign pages_array = '' | split: '' -%} -{%- assign pages_array = pages_array | push: site.html_pages -%} -{%- if site.just_the_docs.collections -%} - {%- for collection_entry in site.just_the_docs.collections -%} - {%- assign collection_key = collection_entry[0] -%} - {%- assign collection_value = collection_entry[1] -%} - {%- assign collection = site[collection_key] -%} - {%- if collection_value.search_exclude != true -%} - {%- assign pages_array = pages_array | push: collection -%} - {%- endif -%} - {%- endfor -%} -{%- endif -%} -{%- for pages in pages_array -%} - {%- for page in pages -%} - {%- if page.title and page.search_exclude != true -%} - {%- assign page_content = page.content -%} - {%- assign heading_level = site.search.heading_level | default: 2 -%} - {%- for j in (2..heading_level) -%} - {%- assign tag = '' -%} - {%- assign title = titleAndContent[0] | replace_first: '>', '

' | split: '

' -%} - {%- assign title = title[1] | strip_html -%} - {%- assign content = titleAndContent[1] -%} - {%- assign url = page.url -%} - {%- if title == page.title and parts[0] == '' -%} - {%- assign title_found = true -%} - {%- else -%} - {%- assign id = titleAndContent[0] -%} - {%- assign id = id | split: 'id="' -%} - {%- if id.size == 2 -%} - {%- assign id = id[1] -%} - {%- assign id = id | split: '"' -%} - {%- assign id = id[0] -%} - {%- capture url -%}{{ url | append: '#' | append: id }}{%- endcapture -%} - {%- endif -%} - {%- endif -%} - {%- unless i == 0 -%},{%- endunless -%} - "{{ i }}": { - "doc": {{ page.title | jsonify }}, - "title": {{ title | jsonify }}, - "content": {{ content | replace: '= 3.15. - -```sh -git clone https://github.com/build-cpp/cmkr -cd cmkr -cmake -Bbin -cmake --build bin --parallel -``` diff --git a/docs/command-line.md b/docs/command-line.md new file mode 100644 index 0000000..0d8512d --- /dev/null +++ b/docs/command-line.md @@ -0,0 +1,22 @@ +--- +layout: page +title: Command line +permalink: /command-line/ +nav_order: 2 +--- + +## Command line + +Optionally you can install `cmkr` in your `PATH` and use it as a utility from the command line: + +``` +Usage: cmkr [arguments] +arguments: + init [executable|library|shared|static|interface] Starts a new project in the same directory. + gen Generates CMakeLists.txt file. + build Run cmake and build. + install Run cmake --install. Needs admin privileges. + clean Clean the build directory. + help Show help. + version Current cmkr version. +``` \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000..e0c4123 Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..e4c9466 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,17 @@ +--- +layout: page +title: Getting started +permalink: /getting-started/ +nav_order: 1 +--- + +## Getting started + +The easiest way to get started is to use the [cmkr_for_beginners](https://github.com/build-cpp/cmkr_for_beginners) template repository. Either open it in [Gitpod](https://gitpod.io/#https://github.com/build-cpp/cmkr_for_beginners), or clone the repository and run: + +```sh +cmake -B build +cmake --build build +``` + +Alternatively you can check out the [cmkr topic](https://github.com/topics/cmkr) or the [build-cpp organization](https://github.com/build-cpp) for more examples and templates. \ No newline at end of file diff --git a/docs/hammer-svgrepo-com.png b/docs/hammer-svgrepo-com.png new file mode 100644 index 0000000..3805410 Binary files /dev/null and b/docs/hammer-svgrepo-com.png differ diff --git a/docs/hammer-svgrepo-com.svg b/docs/hammer-svgrepo-com.svg new file mode 100644 index 0000000..691537c --- /dev/null +++ b/docs/hammer-svgrepo-com.svg @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/index.markdown b/docs/index.markdown deleted file mode 100644 index 4089114..0000000 --- a/docs/index.markdown +++ /dev/null @@ -1,10 +0,0 @@ ---- -layout: home -nav_order: 0 ---- - -# cmkr - -cmkr, pronounced "cmaker", is A CMakeLists.txt generator from TOML. - -See the [cmkr topic](https://github.com/topics/cmkr) for examples. Feel free to add the `cmkr` topic to your projects if you used cmkr! diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..6c3718f --- /dev/null +++ b/docs/index.md @@ -0,0 +1,25 @@ +--- +layout: home +title: Index +nav_order: 0 +--- + +# Index + +`cmkr`, pronounced "cmaker", is a modern build system based on [CMake](https://cmake.org/) and [TOML](https://toml.io). It was originally created by [Mohammed Alyousef](https://github.com/MoAlyousef). + +**NOTE**: The documentation is currently a work-in-progress due to breaking changes since `0.1.4`. For examples you can check the [cmkr GitHub topic](https://github.com/topics/cmkr) and the [tests](https://github.com/build-cpp/cmkr/tree/main/tests). + +`cmkr` parses `cmake.toml` files and generates a modern, idiomatic `CMakeLists.txt` for you. A minimal example: + +```toml +[project] +name = "cmkr_for_beginners" +description = "A minimal cmkr project." + +[target.hello_world] +type = "executable" +sources = ["src/main.cpp"] +``` + +`cmkr` can bootstrap itself from CMake and consumers of your project do not need to install anything to use it. \ No newline at end of file diff --git a/docs/usage.markdown b/docs/usage.markdown deleted file mode 100644 index 6b20d82..0000000 --- a/docs/usage.markdown +++ /dev/null @@ -1,45 +0,0 @@ ---- -layout: page -title: Usage -permalink: /usage/ -nav_order: 2 ---- - -# Usage - -cmkr parses cmake.toml files (using toml11 by Toru Niina) at the project directory. A basic hello world format with the minimum required fields: - -```toml -[cmake] -minimum = "3.15" - -[project] -name = "app" -version = "0.1.0" - -[target.app] -type = "executable" -sources = ["src/main.cpp"] -``` - -**NOTE**: The documentation is currently a work-in-progress due to breaking changes since `0.1.4`. For examples you can check the [cmkr topic](https://github.com/topics/cmkr). - -The cmkr executable can be run from the command-line: - -``` -Usage: cmkr [arguments] -arguments: - init [executable|library|shared|static|interface] Starts a new project in the same directory. - gen Generates CMakeLists.txt file. - build Run cmake and build. - install Run cmake --install. Needs admin privileges. - clean Clean the build directory. - help Show help. - version Current cmkr version. -``` - -The build command invokes cmake and the default build-system on your platform (unless a generator is specified), it also accepts extra cmake build arguments: - -```sh -cmkr build --config Release -``` \ No newline at end of file