From 5e13c16cb6cc0538101abb36d8900725469577fe Mon Sep 17 00:00:00 2001 From: f4exb Date: Mon, 20 Nov 2017 23:57:53 +0100 Subject: [PATCH] Web API: static page build on Linux --- sdrbase/CMakeLists.txt | 6 +++--- sdrbase/webapi/webapirequestmapper.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index 87da8ceec..56a2849a7 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -231,13 +231,13 @@ if (BUILD_DEBIAN) include_directories(${LIBSERIALDVSRC}) endif (BUILD_DEBIAN) -add_definitions(${QT_DEFINITIONS}) -add_definitions(-DQT_SHARED) - set(sdrbase_RESOURCES resources/res.qrc ) +add_definitions(${QT_DEFINITIONS}) +add_definitions(-DQT_SHARED) + qt5_add_resources(sdrbase_RESOURCES_RCC ${sdrbase_RESOURCES}) add_library(sdrbase SHARED diff --git a/sdrbase/webapi/webapirequestmapper.cpp b/sdrbase/webapi/webapirequestmapper.cpp index a71d7b665..80e05d4ae 100644 --- a/sdrbase/webapi/webapirequestmapper.cpp +++ b/sdrbase/webapi/webapirequestmapper.cpp @@ -71,7 +71,7 @@ void WebAPIRequestMapper::service(qtwebapp::HttpRequest& request, qtwebapp::Http } else { - QByteArray path = "/"; + QByteArray path = "/index.html"; m_staticFileController->service(path, response); //response.setStatus(404,"Not found"); }