diff --git a/cmake/cmkr.cmake b/cmake/cmkr.cmake index 262cac3..b41eb46 100644 --- a/cmake/cmkr.cmake +++ b/cmake/cmkr.cmake @@ -1,5 +1,9 @@ include_guard() +# Change these defaults to point to your infrastructure if desired +set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE) +set(CMKR_TAG "v0.2.0" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE) + # To bootstrap/generate a cmkr project: cmake -P cmkr.cmake if(CMAKE_SCRIPT_MODE_FILE) set(CMAKE_BINARY_DIR "${CMAKE_BINARY_DIR}/build") @@ -7,10 +11,6 @@ if(CMAKE_SCRIPT_MODE_FILE) file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}") endif() -# Change these defaults to point to your infrastructure if desired -set(CMKR_REPO "https://github.com/build-cpp/cmkr" CACHE STRING "cmkr git repository" FORCE) -set(CMKR_TAG "v0.2.0" CACHE STRING "cmkr git tag (this needs to be available forever)" FORCE) - # Set these from the command line to customize for development/debugging purposes set(CMKR_EXECUTABLE "" CACHE FILEPATH "cmkr executable") set(CMKR_SKIP_GENERATION OFF CACHE BOOL "skip automatic cmkr generation") diff --git a/cmake/generate_documentation.cmake b/cmake/generate_documentation.cmake index d4fcb68..d2329c9 100644 --- a/cmake/generate_documentation.cmake +++ b/cmake/generate_documentation.cmake @@ -46,14 +46,14 @@ function(generate_documentation) string(REGEX MATCH "^(\n*(#[^\n]+\n)+\n*)" EXAMPLE_HEADER "${test_contents}") string(LENGTH "${EXAMPLE_HEADER}" header_length) string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER) - string(REGEX REPLACE "\n# ?" "\n" EXAMPLE_HEADER "\n${EXAMPLE_HEADER}") + string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_HEADER "\n${EXAMPLE_HEADER}") string(STRIP "${EXAMPLE_HEADER}" EXAMPLE_HEADER) # Extract footer text string(REGEX MATCH "(((#[^\n]+)(\n+|$))+)$" EXAMPLE_FOOTER "${test_contents}") string(LENGTH "${EXAMPLE_FOOTER}" footer_length) string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER) - string(REGEX REPLACE "\n# ?" "\n" EXAMPLE_FOOTER "\n${EXAMPLE_FOOTER}") + string(REGEX REPLACE "\n# ?" "\n\n" EXAMPLE_FOOTER "\n${EXAMPLE_FOOTER}") string(STRIP "${EXAMPLE_FOOTER}" EXAMPLE_FOOTER) # Extract toml body diff --git a/docs/.gitignore b/docs/.gitignore index 75100cf..655931e 100644 --- a/docs/.gitignore +++ b/docs/.gitignore @@ -1,2 +1,3 @@ _site/ .jekyll-metadata +assets/ diff --git a/docs/cmake-toml.md b/docs/cmake-toml.md index 5f0ac9b..f5e826e 100644 --- a/docs/cmake-toml.md +++ b/docs/cmake-toml.md @@ -96,6 +96,8 @@ packages = ["fmt", "zlib"] 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). +To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`. + ## Packages ```toml diff --git a/docs/examples/vcpkg.md b/docs/examples/vcpkg.md index 237d397..9ebb048 100644 --- a/docs/examples/vcpkg.md +++ b/docs/examples/vcpkg.md @@ -33,4 +33,6 @@ link-libraries = ["fmt::fmt"] The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`. +To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`. + This page was automatically generated from [tests/vcpkg/cmake.toml](https://github.com/build-cpp/cmkr/tree/main/tests/vcpkg/cmake.toml). diff --git a/tests/vcpkg/cmake.toml b/tests/vcpkg/cmake.toml index 9ef39bf..9207dbf 100644 --- a/tests/vcpkg/cmake.toml +++ b/tests/vcpkg/cmake.toml @@ -18,4 +18,5 @@ type = "executable" sources = ["src/main.cpp"] link-libraries = ["fmt::fmt"] -# The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`. \ No newline at end of file +# The bootstrapping of vcpkg is fully automated and no user interaction is necessary. You can disable vcpkg by setting `CMKR_DISABLE_VCPKG=ON`. +# To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`. \ No newline at end of file