You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
862 B
CMake
30 lines
862 B
CMake
# https://arthursonzogni.github.io/FTXUI/#build-cmake
|
|
#
|
|
# usage:
|
|
# FetchContent_MakeAvailable(ftxui)
|
|
# target_link_libraries(${PROJECT_NAME}
|
|
# PRIVATE ftxui::screen
|
|
# PRIVATE ftxui::dom
|
|
# PRIVATE ftxui::component++
|
|
# )
|
|
|
|
|
|
if (NOT DEFINED FTXUI_GIT_TAG)
|
|
message(FATAL_ERROR "FTXUI_GIT_TAG is not defined.\n see https://github.com/ArthurSonzogni/ftxui and grab a release tag.\n example: set(FTXUI_GIT_TAG v3.0.0)")
|
|
endif()
|
|
|
|
FetchContent_Declare(
|
|
ftxui
|
|
GIT_REPOSITORY https://github.com/ArthurSonzogni/ftxui
|
|
GIT_TAG ${FTXUI_GIT_TAG}
|
|
)
|
|
|
|
FetchContent_GetProperties(ftxui)
|
|
if(NOT ftxui_POPULATED)
|
|
FetchContent_Populate(ftxui)
|
|
add_subdirectory(${ftxui_SOURCE_DIR} ${ftxui_BINARY_DIR} EXCLUDE_FROM_ALL)
|
|
endif()
|
|
|
|
include(${CMAKE_SOURCE_DIR}/cmake/Utils.cmake)
|
|
print_git_tag(${FTXUI_GIT_TAG})
|