This commit is contained in:
2025-07-18 20:54:34 +03:00
parent 168aa551c9
commit 27e1138441
4 changed files with 36 additions and 0 deletions

1
.gitignore vendored
View File

@@ -46,3 +46,4 @@ CMakeUserPresets.json
*.out
*.app
build/

22
CMakeLists.txt Normal file
View File

@@ -0,0 +1,22 @@
# Minimum CMake version required, we'll just use the latest version.
cmake_minimum_required(VERSION 3.22)
# Project name, version and description
project(TheBartender VERSION 1.0)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
# Create an executable
add_executable(${PROJECT_NAME} src/main.cpp)
# Find our pre-installed DPP package (using FindDPP.cmake).
find_package(DPP REQUIRED)
# Link the pre-installed DPP package.
target_link_libraries(${PROJECT_NAME} ${DPP_LIBRARIES})
# Include the DPP directories.
target_include_directories(${PROJECT_NAME} PRIVATE ${DPP_INCLUDE_DIR})
# Set C++ version
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 20
CXX_STANDARD_REQUIRED ON)

13
cmake/FindDPP.cmake Normal file
View File

@@ -0,0 +1,13 @@
find_path(
DPP_INCLUDE_DIR
NAMES dpp/dpp.h
HINTS ${DPP_ROOT_DIR})
find_library(
DPP_LIBRARIES
NAMES dpp "libdpp.a"
HINTS ${DPP_ROOT_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DPP DEFAULT_MSG DPP_LIBRARIES DPP_INCLUDE_DIR)

0
src/main.cpp Normal file
View File