mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-06-25 00:52:09 +08:00
tweaks
This commit is contained in:
parent
cb8ebdeb44
commit
f6dceabdc9
@ -1,11 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.12)
|
|
||||||
|
|
||||||
project(ftxui
|
|
||||||
LANGUAGES CXX
|
|
||||||
VERSION 6.0.2
|
|
||||||
DESCRIPTION "C++ Functional Terminal User Interface."
|
|
||||||
)
|
|
||||||
|
|
||||||
option(FTXUI_BUILD_DOCS "Set to ON to build docs" OFF)
|
option(FTXUI_BUILD_DOCS "Set to ON to build docs" OFF)
|
||||||
option(FTXUI_BUILD_EXAMPLES "Set to ON to build examples" OFF)
|
option(FTXUI_BUILD_EXAMPLES "Set to ON to build examples" OFF)
|
||||||
option(FTXUI_BUILD_MODULES "Build the C++20 modules" OFF)
|
option(FTXUI_BUILD_MODULES "Build the C++20 modules" OFF)
|
||||||
@ -17,6 +9,19 @@ option(FTXUI_ENABLE_COVERAGE "Execute code coverage" OFF)
|
|||||||
option(FTXUI_ENABLE_INSTALL "Generate the install target" ON)
|
option(FTXUI_ENABLE_INSTALL "Generate the install target" ON)
|
||||||
option(FTXUI_QUIET "Set to ON for FTXUI to be quiet" OFF)
|
option(FTXUI_QUIET "Set to ON for FTXUI to be quiet" OFF)
|
||||||
|
|
||||||
|
if (FTXUI_BUILD_MODULES)
|
||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
else()
|
||||||
|
cmake_minimum_required(VERSION 3.28.2)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
project(ftxui
|
||||||
|
LANGUAGES CXX
|
||||||
|
VERSION 6.0.2
|
||||||
|
DESCRIPTION "C++ Functional Terminal User Interface."
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
set(FTXUI_MICROSOFT_TERMINAL_FALLBACK_HELP_TEXT "On windows, assume the \
|
set(FTXUI_MICROSOFT_TERMINAL_FALLBACK_HELP_TEXT "On windows, assume the \
|
||||||
terminal used will be one of Microsoft and use a set of reasonnable fallback \
|
terminal used will be one of Microsoft and use a set of reasonnable fallback \
|
||||||
to counteract its implementations problems.")
|
to counteract its implementations problems.")
|
||||||
|
@ -2,13 +2,10 @@ if (NOT FTXUI_BUILD_MODULES)
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.28)
|
|
||||||
add_library(ftxui-modules)
|
add_library(ftxui-modules)
|
||||||
|
|
||||||
target_sources(ftxui-modules
|
target_sources(ftxui-modules
|
||||||
PUBLIC
|
PUBLIC FILE_SET CXX_MODULES FILES
|
||||||
FILE_SET CXX_MODULES
|
|
||||||
FILES
|
|
||||||
src/ftxui/component.cppm
|
src/ftxui/component.cppm
|
||||||
src/ftxui/component/Animation.cppm
|
src/ftxui/component/Animation.cppm
|
||||||
src/ftxui/component/CapturedMouse.cppm
|
src/ftxui/component/CapturedMouse.cppm
|
||||||
@ -55,21 +52,30 @@ target_link_libraries(ftxui-modules
|
|||||||
)
|
)
|
||||||
|
|
||||||
target_compile_features(ftxui-modules PUBLIC cxx_std_20)
|
target_compile_features(ftxui-modules PUBLIC cxx_std_20)
|
||||||
|
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
#set_target_properties(ftxui-modules PROPERTIES
|
target_compile_options(${name} PUBLIC -fmodules-ts)
|
||||||
#CXX_STANDARD 23
|
endif ()
|
||||||
#CXX_STANDARD_REQUIRED ON
|
|
||||||
#CXX_EXTENSIONS OFF
|
|
||||||
#CXX_MODULE_DYNDEP OFF
|
|
||||||
#)
|
|
||||||
|
|
||||||
add_library(ftxui::modules ALIAS ftxui-modules)
|
add_library(ftxui::modules ALIAS ftxui-modules)
|
||||||
|
|
||||||
if(FTXUI_ENABLE_INSTALL)
|
if(FTXUI_ENABLE_INSTALL)
|
||||||
install(TARGETS ftxui-modules
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
|
install(TARGETS ftxui-modules
|
||||||
EXPORT ftxui-targets
|
EXPORT ftxui-targets
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
FILE_SET CXX_MODULES
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ftxui
|
||||||
FILE_SET CXX_MODULES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ftxui/modules
|
FILE_SET HEADERS
|
||||||
)
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ftxui
|
||||||
|
INCLUDES
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ftxui
|
||||||
|
)
|
||||||
|
install(EXPORT ftxui-targets
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
||||||
|
CXX_MODULES_DIRECTORY ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
||||||
|
)
|
||||||
|
install(FILES my_package-config.cmake
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
Loading…
Reference in New Issue
Block a user