Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
lefticus committed Apr 27, 2022
2 parents 948679f + e5fa609 commit e349691
Show file tree
Hide file tree
Showing 7 changed files with 348 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/template/template_name
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cmake_conan_boilerplate_template
ftxui_template
2 changes: 1 addition & 1 deletion .github/template/template_repository
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cpp-best-practices/cmake_conan_boilerplate_template
cpp-best-practices/ftxui_template
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,22 @@ set(CMAKE_CXX_STANDARD 20)
# when compiling with PCH enabled
set(CMAKE_CXX_EXTENSIONS OFF)

include(FetchContent)

set(FETCHCONTENT_UPDATES_DISCONNECTED TRUE)
FetchContent_Declare(ftxui
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
GIT_TAG v2.0.0
)

FetchContent_GetProperties(ftxui)
if(NOT ftxui_POPULATED)
FetchContent_Populate(ftxui)
add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
endif()



# Note: by default ENABLE_DEVELOPER_MODE is True
# This means that all analysis (sanitizers, static analysis)
# is enabled and all warnings are treated as errors
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# cmake_conan_boilerplate_template
# ftxui_template

[![ci](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/ci.yml/badge.svg)](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/cpp-best-practices/cmake_conan_boilerplate_template/branch/main/graph/badge.svg)](https://codecov.io/gh/cpp-best-practices/cmake_conan_boilerplate_template)
[![Language grade: C++](https://img.shields.io/lgtm/grade/cpp/github/cpp-best-practices/cmake_conan_boilerplate_template)](https://lgtm.com/projects/g/cpp-best-practices/cmake_conan_boilerplate_template/context:cpp)
[![CodeQL](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/actions/workflows/codeql-analysis.yml)
[![ci](https://github.com/cpp-best-practices/ftxui_template/actions/workflows/ci.yml/badge.svg)](https://github.com/cpp-best-practices/ftxui_template/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/cpp-best-practices/ftxui_template/branch/main/graph/badge.svg)](https://codecov.io/gh/cpp-best-practices/ftxui_template)
[![Language grade: C++](https://img.shields.io/lgtm/grade/cpp/github/cpp-best-practices/ftxui_template)](https://lgtm.com/projects/g/cpp-best-practices/ftxui_template/context:cpp)
[![CodeQL](https://github.com/cpp-best-practices/ftxui_template/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/cpp-best-practices/ftxui_template/actions/workflows/codeql-analysis.yml)

## About cmake_conan_boilerplate_template
## About ftxui_template

This is a C++ Best Practices GitHub template for getting up and running with C++ quickly.

Expand All @@ -28,15 +28,15 @@ It requires
* conan
* a compiler

If you want a more complex example project, check out the [cpp_starter_project](https://github.com/cpp-best-practices/cpp_starter_project).

Ths Boilerplate project will merge new features first, then they will be merged (as appropriate) into cpp_starter_project.
This project gets you started with a simple example of using FTXUI, which happens to also be a game.


## Getting Started

### Use the Github template
First, click the green `Use this template` button near the top of this page.
This will take you to Github's ['Generate Repository'](https://github.com/cpp-best-practices/cmake_conan_boilerplate_template/generate) page.
This will take you to Github's ['Generate Repository'](https://github.com/cpp-best-practices/ftxui_template/generate) page.
Fill in a repository name and short description, and click 'Create repository from template'.
This will allow you to create a new repository in your Github account,
prepopulated with the contents of this project.
Expand Down
1 change: 1 addition & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
catch2/2.13.9
cli11/2.2.0
spdlog/1.10.0
ftxui/2.0.0

[generators]
cmake_find_package_multi
12 changes: 10 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
find_package(fmt CONFIG REQUIRED)
find_package(spdlog CONFIG REQUIRED)
find_package(CLI11 CONFIG REQUIRED)
find_package(ftxui CONFIG REQUIRED)

# Generic test that uses conan libs
add_executable(intro main.cpp)

target_link_libraries(
intro
PUBLIC project_options project_warnings
PRIVATE CLI11::CLI11 fmt::fmt spdlog::spdlog)
PRIVATE project_options
project_warnings
docopt::docopt
fmt::fmt
spdlog::spdlog
ftxui::screen
ftxui::dom
ftxui::component)

target_include_directories(intro PRIVATE "${CMAKE_BINARY_DIR}/configured_files/include")
Loading

0 comments on commit e349691

Please sign in to comment.