2023-01-15 03:37:42 +08:00
|
|
|
if(NOT FTXUI_ENABLE_INSTALL)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2021-06-26 21:14:27 +08:00
|
|
|
include(GNUInstallDirs)
|
|
|
|
install(TARGETS screen dom component
|
|
|
|
EXPORT ftxui-export
|
2021-07-06 08:10:35 +08:00
|
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
|
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
2021-06-26 21:14:27 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
install(DIRECTORY include/ftxui DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
|
|
|
|
|
|
|
include(CMakePackageConfigHelpers)
|
|
|
|
configure_package_config_file(ftxui-config.cmake.in
|
|
|
|
${CMAKE_CURRENT_BINARY_DIR}/ftxui-config.cmake
|
|
|
|
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/ftxui/cmake
|
|
|
|
PATH_VARS CMAKE_INSTALL_INCLUDEDIR
|
|
|
|
)
|
|
|
|
write_basic_package_version_file(
|
|
|
|
ftxui-config-version.cmake
|
|
|
|
VERSION ${PACKAGE_VERSION}
|
|
|
|
COMPATIBILITY AnyNewerVersion
|
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/ftxui-config.cmake
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
|
|
|
)
|
|
|
|
install(EXPORT ftxui-export
|
|
|
|
FILE ftxui-config-version.cmake
|
|
|
|
NAMESPACE ftxui::
|
|
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ftxui
|
|
|
|
)
|