Skip to content

Commit

Permalink
Merge pull request cpp-best-practices#6 from blaz-kranjc/feature-ftxu…
Browse files Browse the repository at this point in the history
…i-with-conan

Fetch ftxui from conan.
  • Loading branch information
lefticus authored Apr 14, 2022
2 parents e5fa609 + 369f515 commit 54a0af9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
14 changes: 0 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,6 @@ 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
1 change: 1 addition & 0 deletions conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ catch2/2.13.8
docopt.cpp/0.6.3
#fmt/8.1.1
spdlog/1.9.2
ftxui/2.0.0

[generators]
cmake_find_package_multi
13 changes: 5 additions & 8 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
find_package(fmt CONFIG)
find_package(spdlog CONFIG)
find_package(docopt CONFIG)
find_package(ftxui CONFIG)

# Generic test that uses conan libs
add_executable(intro main.cpp)
Expand All @@ -10,13 +11,9 @@ target_link_libraries(
project_warnings
docopt::docopt
fmt::fmt
spdlog::spdlog)

target_link_system_libraries(
intro
PRIVATE
ftxui::screen
ftxui::dom
ftxui::component)
spdlog::spdlog
ftxui::screen
ftxui::dom
ftxui::component)

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

0 comments on commit 54a0af9

Please sign in to comment.