Awesome
Brisk Example Project
This project demonstrates how to use the Brisk C++ library to build an application using CMake. It includes a simple executable that links to the Brisk library.
Prerequisites
To build and run this project, ensure you have the following installed:
- C++ compiler supporting C++20 or later
- CMake version 3.16 or higher
- Brisk Library source code (Ensure
BRISK_DIR
is properly set to the location of the Brisk repository:-DBRISK_DIR=path/to/brisk/repository
)
Project Structure
main.cpp
: This file contains the entry point and core logic for the example application.CMakeLists.txt
: Configuration file for CMake to build the project and link necessary libraries.
Building the Project
- Clone or download the repository to your local machine.
- Navigate to the project directory:
cd path/to/project
- Create a build directory and navigate into it:
mkdir build && cd build
- Run CMake to configure the project:
cmake -DBRISK_DIR=path/to/brisk/repository -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
- Build the project:
cmake --build .
Dependencies
The Brisk dependencies are built using the vcpkg package manager. Vcpkg manages the dependencies by using source packages and builds each dependent library from its sources, which may lead to significant build times on the first run. It is recommended to set up a binary cache to reuse built libraries across multiple Brisk projects.
CMake Configuration
The provided CMakeLists.txt
file includes the following key components:
- Project Setup: The project is configured with the
brisk_setup()
function, and the metadata for the application is defined viabrisk_metadata()
. - Executable Setup: The project compiles the
main.cpp
file into an executable and links it to the Brisk libraries (brisk-widgets
andbrisk-executable
).
add_executable(main main.cpp)
target_link_libraries(main PRIVATE brisk-widgets brisk-executable)
Ensure that the Brisk library is available and properly linked in your environment.
License
The Brisk library is licensed under a dual GPLv2+/Commercial license.
The example project contained in this repository is licensed under the public domain or CC0. You are free to modify this code and use it as a starting point for your own projects, either GPL-licensed or proprietary (provided you have acquired a commercial license for the Brisk library, for details, contact brisk@brisklib.com).