Skip to content

Commit 5951f69

Browse files
committed
Update documentation for vcpkg features
1 parent a6d5f1c commit 5951f69

File tree

6 files changed

+13
-7
lines changed

6 files changed

+13
-7
lines changed

cmake/cmkr.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
include_guard()
22

3+
# Change these defaults to point to your infrastructure if desired
4+
set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE)
5+
set(CMKR_TAG "v0.2.0" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE)
6+
37
# To bootstrap/generate a cmkr project: cmake -P cmkr.cmake
48
if(CMAKE_SCRIPT_MODE_FILE)
59
set(CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}/build")
610
set(CMAKE_CURRENT_BINARY_DIR "${CMAKE_BINARY_DIR}")
711
file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}")
812
endif()
913

10-
# Change these defaults to point to your infrastructure if desired
11-
set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE)
12-
set(CMKR_TAG "v0.2.0" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE)
13-
1414
# Set these from the command line to customize for development/debugging purposes
1515
set(CMKR_EXECUTABLE "" CACHE FILEPATH "cmkr executable")
1616
set(CMKR_SKIP_GENERATION OFF CACHE BOOL "skip automatic cmkr generation")

cmake/generate_documentation.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ function(generate_documentation)
4646
string(REGEX MATCH "^(\n*(#[^\n]+\n)+\n*)" EXAMPLE_HEADER "${test_contents}")
4747
string(LENGTH "${EXAMPLE_HEADER}" header_length)
4848
string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER)
49-
string(REGEX REPLACE "\n# ?" "\n" EXAMPLE_HEADER "\n${EXAMPLE_HEADER}")
49+
string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_HEADER "\n${EXAMPLE_HEADER}")
5050
string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER)
5151

5252
# Extract footer text
5353
string(REGEX MATCH "(((#[^\n]+)(\n+|$))+)$" EXAMPLE_FOOTER "${test_contents}")
5454
string(LENGTH "${EXAMPLE_FOOTER}" footer_length)
5555
string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER)
56-
string(REGEX REPLACE "\n# ?" "\n" EXAMPLE_FOOTER "\n${EXAMPLE_FOOTER}")
56+
string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_FOOTER "\n${EXAMPLE_FOOTER}")
5757
string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER)
5858

5959
# Extract toml body

docs/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
_site/
22
.jekyll-metadata
3+
assets/

docs/cmake-toml.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ packages = ["fmt", "zlib"]
9696

9797
The vcpkg `version` will automatically generate the `url` from the [official repository](https://github.com/microsoft/vcpkg/releases). For a custom registry you can specify your own `url` (and omit the `version`). You can browse available packages on [vcpkg.io](https://vcpkg.io/en/packages.html).
9898

99+
To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`.
100+
99101
## Packages
100102

101103
```toml

docs/examples/vcpkg.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,6 @@ link-libraries = ["fmt::fmt"]
3333

3434
The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`.
3535

36+
To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`.
37+
3638
<sup><sub>This page was automatically generated from [tests/vcpkg/cmake.toml](https://github.com/build-cpp/cmkr/tree/main/tests/vcpkg/cmake.toml).</sub></sup>

tests/vcpkg/cmake.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ type = "executable"
1818
sources = ["src/main.cpp"]
1919
link-libraries = ["fmt::fmt"]
2020

21-
# The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`.
21+
# The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`.
22+
# To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`.

0 commit comments

Comments
 (0)