Skip to content

Commit cd191d4

Browse files
committed
fix: Qt6CoreConfigureFileTemplate.in does not exist
1 parent 8e70452 commit cd191d4

File tree

2 files changed

+20
-23
lines changed

2 files changed

+20
-23
lines changed

CMakeLists.txt

+19-3
Original file line numberDiff line numberDiff line change
@@ -353,14 +353,30 @@ else ()
353353
endif ()
354354

355355
if (GPGFRONTEND_QT5_BUILD)
356+
356357
add_compile_definitions(QT5_BUILD)
358+
359+
# Introduce Qt
360+
# Support Qt version: 5.15.x
361+
find_package(Qt5 5.15 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
362+
357363
else()
364+
358365
add_compile_definitions(QT6_BUILD)
366+
367+
# Introduce Qt
368+
# Support Qt version: 6.x
369+
find_package(Qt6 6 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
370+
359371
endif()
360372

361-
# Basic ENV Configure
362-
set(BASIC_ENV_CONFIG 1)
363-
set(QT_MOC_CONFIG 1)
373+
# Qt configuration
374+
set(CMAKE_AUTOMOC ON)
375+
set(CMAKE_AUTORCC ON)
376+
set(CMAKE_AUTOUIC ON)
377+
378+
set(CMAKE_AUTORCC_OPTIONS "--compress;9")
379+
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_AUTOUIC_SEARCH_PATHS} ${CMAKE_SOURCE_DIR}/ui)
364380

365381
if (STABLE_BUILD_APPLICATION)
366382
message("[+] Build Stable Application")

src/CMakeLists.txt

+1-20
Original file line numberDiff line numberDiff line change
@@ -51,27 +51,8 @@ if (APPLE)
5151
message(FATAL_ERROR "OpenSSL not found in the standard directories. Please install it or set OPENSSL_ROOT_DIR manually.")
5252
endif()
5353
endif()
54-
find_package(OpenSSL REQUIRED)
55-
56-
57-
if(GPGFRONTEND_QT5_BUILD)
58-
# Introduce Qt
59-
# Support Qt version: 5.15.x
60-
find_package(Qt5 5.15 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
61-
else()
62-
# Introduce Qt
63-
# Support Qt version: 6.x
64-
find_package(Qt6 6 COMPONENTS Core Widgets PrintSupport Network LinguistTools REQUIRED)
65-
endif()
6654

67-
68-
# Qt configuration
69-
set(CMAKE_AUTOMOC ON)
70-
set(CMAKE_AUTORCC ON)
71-
set(CMAKE_AUTOUIC ON)
72-
73-
set(CMAKE_AUTORCC_OPTIONS "--compress;9")
74-
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_AUTOUIC_SEARCH_PATHS} ${CMAKE_SOURCE_DIR}/ui)
55+
find_package(OpenSSL REQUIRED)
7556

7657
# Set Build Information
7758
configure_file(${CMAKE_SOURCE_DIR}/src/GpgFrontend.h.in ${CMAKE_SOURCE_DIR}/src/GpgFrontend.h @ONLY)

0 commit comments

Comments
 (0)