stamen

Static Menu Generator
git clone git://git.dimitrijedobrota.com/stamen.git
Log | Files | Refs | README | LICENSE | HACKING | CONTRIBUTING | CODE_OF_CONDUCT | BUILDING

BUILDING.md (2660B)


0 # Building with CMake 1 2 ## Dependencies 3 4 For a list of dependencies, please refer to [vcpkg.json](vcpkg.json). 5 6 ## Build 7 8 This project doesn't require any special command-line flags to build to keep 9 things simple. 10 11 Here are the steps for building in release mode with a single-configuration 12 generator, like the Unix Makefiles one: 13 14 ```sh 15 cmake -S . -B build -D CMAKE_BUILD_TYPE=Release 16 cmake --build build 17 ``` 18 19 Here are the steps for building in release mode with a multi-configuration 20 generator, like the Visual Studio ones: 21 22 ```sh 23 cmake -S . -B build 24 cmake --build build --config Release 25 ``` 26 27 ### Building with MSVC 28 29 Note that MSVC by default is not standards compliant and you need to pass some 30 flags to make it behave properly. See the `flags-msvc` preset in the 31 [CMakePresets.json](CMakePresets.json) file for the flags and with what 32 variable to provide them to CMake during configuration. 33 34 ### Building on Apple Silicon 35 36 CMake supports building on Apple Silicon properly since 3.20.1. Make sure you 37 have the [latest version][1] installed. 38 39 ## Install 40 41 This project doesn't require any special command-line flags to install to keep 42 things simple. As a prerequisite, the project has to be built with the above 43 commands already. 44 45 The below commands require at least CMake 3.15 to run, because that is the 46 version in which [Install a Project][2] was added. 47 48 Here is the command for installing the release mode artifacts with a 49 single-configuration generator, like the Unix Makefiles one: 50 51 ```sh 52 cmake --install build 53 ``` 54 55 Here is the command for installing the release mode artifacts with a 56 multi-configuration generator, like the Visual Studio ones: 57 58 ```sh 59 cmake --install build --config Release 60 ``` 61 62 ### CMake package 63 64 This project exports a CMake package to be used with the [`find_package`][3] 65 command of CMake: 66 67 * Package name: `stamen` 68 * Target name: `stamen::stamen` 69 70 Example usage: 71 72 ```cmake 73 find_package(stamen REQUIRED) 74 # Declare the imported target as a build requirement using PRIVATE, where 75 # project_target is a target created in the consuming project 76 target_link_libraries( 77 project_target PRIVATE 78 stamen::stamen 79 ) 80 ``` 81 82 ### Note to packagers 83 84 The `CMAKE_INSTALL_INCLUDEDIR` is set to a path other than just `include` if 85 the project is configured as a top level project to avoid indirectly including 86 other libraries when installed to a common prefix. Please review the 87 [install-rules.cmake](cmake/install-rules.cmake) file for the full set of 88 install rules. 89 90 [1]: https://cmake.org/download/ 91 [2]: https://cmake.org/cmake/help/latest/manual/cmake.1.html#install-a-project 92 [3]: https://cmake.org/cmake/help/latest/command/find_package.html