From 6916bbffccc5826bc64d20f9e6acbed84450549f Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 29 Sep 2018 11:38:43 +0200 Subject: [PATCH] Apply build system changes --- CMakeLists.txt | 1 + gui/CMakeLists.txt | 5 +++-- gui/gui/webviewdefs.h | 30 ++++++++++++++++++++++++++++++ gui/gui/webviewincludes.h | 20 ++++++++++++++++++++ lib/global.h | 8 ++++---- 5 files changed, 58 insertions(+), 6 deletions(-) create mode 100644 gui/gui/webviewdefs.h create mode 100644 gui/gui/webviewincludes.h diff --git a/CMakeLists.txt b/CMakeLists.txt index caf2f6e..21e2776 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,7 @@ set(META_APP_DESCRIPTION "Repository browser for Arch Linux") set(META_VERSION_MAJOR 0) set(META_VERSION_MINOR 2) set(META_VERSION_PATCH 6) +set(META_NO_TIDY ON) project(${META_PROJECT_NAME}) diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index f39d9b7..7330d38 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR) +set(META_PROJECT_TYPE application) +set(META_GUI_OPTIONAL false) + # add project files set(WIDGETS_HEADER_FILES mainwindow.h @@ -16,8 +19,6 @@ set(ICON_FILES ../resources/icons/hicolor/scalable/apps/${META_PROJECT_NAME}.svg ) -set(META_PROJECT_TYPE application) - # find c++utilities find_package(c++utilities 4.0.0 REQUIRED) use_cpp_utilities() diff --git a/gui/gui/webviewdefs.h b/gui/gui/webviewdefs.h new file mode 100644 index 0000000..47a53c2 --- /dev/null +++ b/gui/gui/webviewdefs.h @@ -0,0 +1,30 @@ +// Created via CMake from template webviewdefs.h.in +// WARNING! Any changes to this file will be overwritten by the next CMake run! + +#ifndef REPOINDEX_WEB_VIEW_DEFINES +#define REPOINDEX_WEB_VIEW_DEFINES + +#include + +#if defined(REPOINDEX_USE_WEBENGINE) +# define REPOINDEX_WEB_VIEW QWebEngineView +# define REPOINDEX_WEB_PAGE QWebEnginePage +#elif defined(REPOINDEX_USE_WEBKIT) +# define REPOINDEX_WEB_VIEW QWebView +# define REPOINDEX_WEB_PAGE QWebPage +# define REPOINDEX_WEB_FRAME QWebFrame +#elif !defined(REPOINDEX_NO_WEBVIEW) +# error "No definition for web view provider present." +#endif + +#ifdef REPOINDEX_WEB_VIEW +QT_FORWARD_DECLARE_CLASS(REPOINDEX_WEB_VIEW) +#endif +#ifdef REPOINDEX_WEB_PAGE +QT_FORWARD_DECLARE_CLASS(REPOINDEX_WEB_PAGE) +#endif +#ifdef REPOINDEX_WEB_FRAME +QT_FORWARD_DECLARE_CLASS(REPOINDEX_WEB_FRAME) +#endif + +#endif // REPOINDEX_WEB_VIEW_DEFINES diff --git a/gui/gui/webviewincludes.h b/gui/gui/webviewincludes.h new file mode 100644 index 0000000..f5d11ac --- /dev/null +++ b/gui/gui/webviewincludes.h @@ -0,0 +1,20 @@ +// Created via CMake from template webviewincludes.h.in +// WARNING! Any changes to this file will be overwritten by the next CMake run! + +#ifndef REPOINDEX_WEB_VIEW_INCLUDES +#define REPOINDEX_WEB_VIEW_INCLUDES + +#include + +#if defined(REPOINDEX_USE_WEBENGINE) +# include +# include +#elif defined(REPOINDEX_USE_WEBKIT) +# include +# include +# include +#elif !defined(REPOINDEX_NO_WEBVIEW) +# error "No definition for web view provider present." +#endif + +#endif // REPOINDEX_WEB_VIEW_INCLUDES diff --git a/lib/global.h b/lib/global.h index 871261a..5ba0952 100644 --- a/lib/global.h +++ b/lib/global.h @@ -7,11 +7,11 @@ #include #ifdef LIBREPOINDEX_STATIC -# define LIBREPOINDEX_EXPORT -# define LIBREPOINDEX_IMPORT +#define LIBREPOINDEX_EXPORT +#define LIBREPOINDEX_IMPORT #else -# define LIBREPOINDEX_EXPORT LIB_EXPORT -# define LIBREPOINDEX_IMPORT LIB_IMPORT +#define LIBREPOINDEX_EXPORT LIB_EXPORT +#define LIBREPOINDEX_IMPORT LIB_IMPORT #endif /*!