From 0640f7a902a3489332627ce93aa61c0dc25087b1 Mon Sep 17 00:00:00 2001
From: SineStriker <trueful@163.com>
Date: 周五, 01 12月 2023 19:41:15 +0800
Subject: [PATCH] Add style support

---
 src/stylesupport/qwkstylesupportglobal.h |   18 ++++++++++++++++++
 src/CMakeLists.txt                       |    4 ++++
 src/stylesupport/CMakeLists.txt          |   21 +++++++++++++++++++++
 CMakeLists.txt                           |    1 +
 4 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2597077..11bfc38 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,6 +8,7 @@
 option(QWINDOWKIT_BUILD_STATIC "Build static libraries" OFF)
 option(QWINDOWKIT_BUILD_WIDGETS "Build widgets module" ON)
 option(QWINDOWKIT_BUILD_QUICK "Build quick module" ON)
+option(QWINDOWKIT_BUILD_STYLE_SUPPORT "Build style support module" ON)
 option(QWINDOWKIT_BUILD_EXAMPLES "Build examples" OFF)
 option(QWINDOWKIT_BUILD_DOCUMENTATIONS "Build documentations" OFF)
 option(QWINDOWKIT_INSTALL "Install library" ON)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 34938a5..b0c2943 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -119,6 +119,10 @@
 # ----------------------------------
 add_subdirectory(core)
 
+if(QWINDOWKIT_BUILD_STYLE_SUPPORT)
+    add_subdirectory(stylesupport)
+endif()
+
 if(QWINDOWKIT_BUILD_WIDGETS)
     add_subdirectory(widgets)
 endif()
diff --git a/src/stylesupport/CMakeLists.txt b/src/stylesupport/CMakeLists.txt
new file mode 100644
index 0000000..6cce10d
--- /dev/null
+++ b/src/stylesupport/CMakeLists.txt
@@ -0,0 +1,21 @@
+project(QWKStyleSupport
+    VERSION ${QWINDOWKIT_VERSION}
+    LANGUAGES CXX
+)
+
+set(_src
+    qwkstylesupportglobal.h
+)
+
+qwk_add_library(${PROJECT_NAME} AUTOGEN
+    SOURCES ${_src}
+    LINKS QWKCore
+    QT_LINKS Core Gui
+    QT_INCLUDE_PRIVATE Core Gui
+    PREFIX QWK_STYLESUPPORT
+)
+
+set_target_properties(${PROJECT_NAME} PROPERTIES
+    CXX_STANDARD 17
+    CXX_STANDARD_REQUIRED TRUE
+)
\ No newline at end of file
diff --git a/src/stylesupport/qwkstylesupportglobal.h b/src/stylesupport/qwkstylesupportglobal.h
new file mode 100644
index 0000000..52ac7d5
--- /dev/null
+++ b/src/stylesupport/qwkstylesupportglobal.h
@@ -0,0 +1,18 @@
+#ifndef QWKSTYLESUPPORTGLOBAL_H
+#define QWKSTYLESUPPORTGLOBAL_H
+
+#include <QtGlobal>
+
+#ifndef QWK_STYLESUPPORT_EXPORT
+#  ifdef QWK_STYLESUPPORT_STATIC
+#    define QWK_STYLESUPPORT_EXPORT
+#  else
+#    ifdef QWK_STYLESUPPORT_LIBRARY
+#      define QWK_STYLESUPPORT_EXPORT Q_DECL_EXPORT
+#    else
+#      define QWK_STYLESUPPORT_EXPORT Q_DECL_IMPORT
+#    endif
+#  endif
+#endif
+
+#endif // QWKSTYLESUPPORTGLOBAL_H

--
Gitblit v1.9.1