aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-07-25 17:15:21 +0000
committersaturneric <[email protected]>2024-07-26 10:12:49 +0000
commitcd191d4f876c31697ebf7314b367527ca79f5d3e (patch)
tree2eb4bcaa9fe372effd7a101c5aaa1203d7c8594b
parentfix: solve the wayland issue of flatpak and fix urls at appstream meta file (diff)
downloadGpgFrontend-cd191d4f876c31697ebf7314b367527ca79f5d3e.tar.gz
GpgFrontend-cd191d4f876c31697ebf7314b367527ca79f5d3e.zip
fix: Qt6CoreConfigureFileTemplate.in does not exist
-rw-r--r--CMakeLists.txt22
-rw-r--r--src/CMakeLists.txt21
2 files changed, 20 insertions, 23 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4f3232ad..5c3a4f88 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -353,14 +353,30 @@ else ()
endif ()
if (GPGFRONTEND_QT5_BUILD)
+
add_compile_definitions(QT5_BUILD)
+
+ # Introduce Qt
+ # Support Qt version: 5.15.x
+ find_package(Qt5 5.15 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
+
else()
+
add_compile_definitions(QT6_BUILD)
+
+ # Introduce Qt
+ # Support Qt version: 6.x
+ find_package(Qt6 6 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
+
endif()
-# Basic ENV Configure
-set(BASIC_ENV_CONFIG 1)
-set(QT_MOC_CONFIG 1)
+# Qt configuration
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTORCC ON)
+set(CMAKE_AUTOUIC ON)
+
+set(CMAKE_AUTORCC_OPTIONS "--compress;9")
+set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_AUTOUIC_SEARCH_PATHS} ${CMAKE_SOURCE_DIR}/ui)
if (STABLE_BUILD_APPLICATION)
message("[+] Build Stable Application")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 48efd191..c416e681 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -51,27 +51,8 @@ if (APPLE)
message(FATAL_ERROR "OpenSSL not found in the standard directories. Please install it or set OPENSSL_ROOT_DIR manually.")
endif()
endif()
-find_package(OpenSSL REQUIRED)
-
-
-if(GPGFRONTEND_QT5_BUILD)
- # Introduce Qt
- # Support Qt version: 5.15.x
- find_package(Qt5 5.15 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
-else()
- # Introduce Qt
- # Support Qt version: 6.x
- find_package(Qt6 6 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
-endif()
-
-# Qt configuration
-set(CMAKE_AUTOMOC ON)
-set(CMAKE_AUTORCC ON)
-set(CMAKE_AUTOUIC ON)
-
-set(CMAKE_AUTORCC_OPTIONS "--compress;9")
-set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_AUTOUIC_SEARCH_PATHS} ${CMAKE_SOURCE_DIR}/ui)
+find_package(OpenSSL REQUIRED)
# Set Build Information
configure_file(${CMAKE_SOURCE_DIR}/src/GpgFrontend.h.in ${CMAKE_SOURCE_DIR}/src/GpgFrontend.h @ONLY)