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 (2572B)


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