From 8b0f27604c2b47d3c3987aa7c1a8f5598d39d454 Mon Sep 17 00:00:00 2001 From: "Azamat H. Hackimov" Date: Tue, 27 Aug 2024 01:10:41 +0300 Subject: [PATCH] Use plog from vcpkg on CI Additional documentation on changes. --- .github/workflows/build.yml | 2 +- BUILD.md | 25 +++++++++++++------------ Brewfile | 5 +++-- vcpkg.json | 1 + 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 559d0d6c..84325955 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,7 +87,7 @@ jobs: env: CC: ${{ matrix.os.cc }} CXX: ${{ matrix.os.cxx }} - run: cmake --preset ${{ matrix.os.preset }} -DBUILD_TESTING=ON -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON -DBUILD_EDITOR=ON + run: cmake --preset ${{ matrix.os.preset }} -DBUILD_TESTING=ON -DENABLE_LOGGER=ON -DFORCE_PORTABLE_INSTALL=ON -DBUILD_EDITOR=ON -DUSE_EXTERNAL_PLOG=ON - name: Build ${{ matrix.build_type }} run: cmake --build --preset ${{ matrix.os.preset }} --config ${{ matrix.build_type }} --verbose diff --git a/BUILD.md b/BUILD.md index 2dc68fd3..69543afd 100644 --- a/BUILD.md +++ b/BUILD.md @@ -68,13 +68,13 @@ Once CMake finishes, the built files will be put in `builds\win\Descent3\Debug` You will need `$VCPKG_ROOT` defined in the environment for all build runs. It is a good idea to set this in your `.bashrc` or equivalent. * If you would like to manage the code dependencies yourself: ```sh - brew install sdl2 zlib googletest + brew bundle install ``` 3. **Clone the Descent3 source code.** ```sh - git clone https://github.com/DescentDevelopers/Descent3 + git clone --recurse-submodules https://github.com/DescentDevelopers/Descent3 ``` 4. **Build Descent3.** @@ -158,13 +158,14 @@ cmake --preset linux -DENABLE_LOGGER=ON **NOTE:** CMake variables, or more technically _CMake cache entries_, will persist in their values until they are explicitly cleared. So, if you set a variable and then run another CMake command _without_ that variable specified, the variable will still be set. Variables must be explicitly unset, or the `builds/` directory cleaned, in order to be cleared. -| Option | Description | Default | -| ------ | ----------- | ------- | -| `CMAKE_BUILD_TYPE`
(or just [`--config`](https://cmake.org/cmake/help/latest/manual/cmake.1.html#cmdoption-cmake-build-config), without the `-D` syntax) |

`Debug` builds are generally larger, slower and contain extra correctness checks that will validate game data and interrupt gameplay when problems are detected.

`Release` builds are optimized for size and speed and do not include debugging information, which makes it harder to find problems.

| `Debug` | -| `BUILD_EDITOR` | _(Windows-only)_ Build internal editor. | `OFF` | -| `BUILD_TESTING` | Enable testing. Requires GTest. | `OFF` | -| `ENABLE_LOGGER` | Enable logging to the terminal. | `OFF` | -| `ENABLE_MEM_RTL` | Enable Real-time library memory management functions (disable to verbose memory allocations). | `ON` | -| `FORCE_COLORED_OUTPUT` | Always produce ANSI-colored compiler warnings/errors (GCC/Clang only; esp. useful with Ninja). | `OFF` | -| `FORCE_PORTABLE_INSTALL` | Install all files into local directory defined by `CMAKE_INSTALL_PREFIX`. | `ON` | -| `USE_VCPKG` | Explicitly control whether or not to use vcpkg for dependency resolution. `ON` requires the environment variable `VCPKG_ROOT` to be set. | Determined by the existence of `VCPKG_ROOT` in the environment: If it exists, vcpkg is used. | +| Option | Description | Default | +|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------| +| `CMAKE_BUILD_TYPE` | `Debug` builds are generally larger, slower and contain extra correctness checks that will validate game data and interrupt gameplay when problems are detected.
`Release` builds are optimized for size and speed and do not include debugging information, which makes it harder to find problems. | `Debug` | +| `BUILD_EDITOR` | _(Windows-only)_ Build internal editor. | `OFF` | +| `BUILD_TESTING` | Enable testing. Requires GTest. | `OFF` | +| `ENABLE_LOGGER` | Enable logging to the terminal. | `OFF` | +| `ENABLE_MEM_RTL` | Enable Real-time library memory management functions (disable to verbose memory allocations). | `ON` | +| `FORCE_COLORED_OUTPUT` | Always produce ANSI-colored compiler warnings/errors (GCC/Clang only; esp. useful with Ninja). | `OFF` | +| `FORCE_PORTABLE_INSTALL` | Install all files into local directory defined by `CMAKE_INSTALL_PREFIX`. | `ON` | +| `USE_EXTERNAL_PLOG` | Use system plog library. | `OFF` | +| `USE_VCPKG` | Explicitly control whether or not to use vcpkg for dependency resolution. `ON` requires the environment variable `VCPKG_ROOT` to be set. | Determined by the existence of `VCPKG_ROOT` in the environment: If it exists, vcpkg is used. | diff --git a/Brewfile b/Brewfile index 2f716b79..d6613ed7 100644 --- a/Brewfile +++ b/Brewfile @@ -1,5 +1,8 @@ # Homebrew dependencies to build Descent3 +brew "glm" +brew "plog" + # SDL brew "sdl2" @@ -9,5 +12,3 @@ brew "ninja" # zlib brew "zlib" - -brew "glm" \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json index 21517cca..8ef14ccb 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -3,6 +3,7 @@ "dependencies": [ "glm", "gtest", + "plog", "zlib", { "name": "sdl2",