File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -362,7 +362,7 @@ endif()
362362# --------------------------------------------------------------------
363363# ui dependency
364364# --------------------------------------------------------------------
365- if (NOT TARGET vix::ui AND NOT TARGET vix_ui AND NOT TARGET ui)
365+ if (NOT VIX_CORE_WITH_UI STREQUAL "OFF" AND NOT TARGET vix::ui AND NOT TARGET vix_ui AND NOT TARGET ui)
366366 if (EXISTS "${CMAKE_CURRENT_LIST_DIR } /../ui/CMakeLists.txt" )
367367 message (STATUS "[core] Adding ui from sibling: ../ui" )
368368 add_subdirectory ("${CMAKE_CURRENT_LIST_DIR } /../ui" "ui" )
Original file line number Diff line number Diff line change 3333#include < nlohmann/json.hpp>
3434#include < vix/template/Context.hpp>
3535#include < vix/view/TemplateView.hpp>
36+ #ifndef VIX_CORE_NO_UI
3637#include < vix/ui/core/View.hpp>
3738#include < vix/ui/html/HtmlResponse.hpp>
39+ #endif
3840
3941namespace vix ::http
4042{
@@ -449,6 +451,7 @@ namespace vix::http
449451 return *this ;
450452 }
451453
454+ #ifndef VIX_CORE_NO_UI
452455 /* * @brief Send a Vix UI HTML response. */
453456 ResponseWrapper &ui (const vix::ui::HtmlResponse &response)
454457 {
@@ -492,6 +495,7 @@ namespace vix::http
492495 return ui (vix::ui::HtmlResponse::from_view_result (result, s));
493496 }
494497
498+ #endif
495499 /* * @brief Send JSON using nlohmann::json with an auto Content-Type if missing. */
496500 ResponseWrapper &json (const vix::json::Json &j)
497501 {
You can’t perform that action at this time.
0 commit comments