Skip to content

Commit

Permalink
Simplified finding of Qt modules with cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujan committed Sep 10, 2022
1 parent 386f44f commit a4d5eab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
3 changes: 2 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
V1.3.2
---------
* Added a real Unix signal handler.
* Added a real Unix signal handler. It was needed to work around a Qt6 bug under Wayland, which reported close signals of Wayland WMs as non-spontaneous (there was no prompt on closing windows by Wayland WMs).
* Removed instant tab tooltips when tab DND is disabled (because some Wayland compositors have problem with instant tooltips of inactive windows).
* Consider the script sign in Lua.
* Fixed the enabled state of the "Other" action in the "Encoding" menu.
* Removed the detection of legacy encodings and simplified the "Encoding" menu with Qt6.
* Added Toml syntax highlighting.
* Reduced the maximum block size of HTML for syntax highlighting to 5000.
* Simplified finding of Qt modules with cmake.

V1.3.1
---------
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Latest version:

2 Sep 2022, V1.3.2
10 Sep 2022, V1.3.2

See "ChangeLog" for changes.
18 changes: 4 additions & 14 deletions featherpad/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,17 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

if(NOT ENABLE_QT5)
set(QT_VERSION_MAJOR 6)
find_package(Qt6Core "${QT6_MINIMUM_VERSION}" REQUIRED)
find_package(Qt6Gui "${QT6_MINIMUM_VERSION}" REQUIRED)
find_package(Qt6Widgets "${QT6_MINIMUM_VERSION}" REQUIRED)
find_package(Qt6Svg "${QT6_MINIMUM_VERSION}" REQUIRED)
find_package(Qt6PrintSupport "${QT6_MINIMUM_VERSION}" REQUIRED)
find_package(Qt6DBus "${QT6_MINIMUM_VERSION}" REQUIRED)
find_package(Qt6 "${QT6_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets Svg PrintSupport DBus)
else()
set(QT_VERSION_MAJOR 5)
find_package(Qt5Core "${QT5_MINIMUM_VERSION}" REQUIRED)
find_package(Qt5Gui "${QT5_MINIMUM_VERSION}" REQUIRED)
find_package(Qt5Widgets "${QT5_MINIMUM_VERSION}" REQUIRED)
find_package(Qt5Svg "${QT5_MINIMUM_VERSION}" REQUIRED)
find_package(Qt5PrintSupport "${QT5_MINIMUM_VERSION}" REQUIRED)
find_package(Qt5DBus "${QT5_MINIMUM_VERSION}" REQUIRED)
find_package(Qt5 "${QT5_MINIMUM_VERSION}" REQUIRED COMPONENTS Core Gui Widgets Svg PrintSupport DBus)
endif()

# for spell checking (see FindHUNSPELL.cmake)
find_package(HUNSPELL "${HUNSPELL_MINIMUM_VERSION}" REQUIRED)

# optional localization
find_package(Qt${QT_VERSION_MAJOR}LinguistTools QUIET)
find_package(Qt${QT_VERSION_MAJOR} QUIET COMPONENTS LinguistTools)

# OS/2 needs an additional lib and tune the processor
if(OS2)
Expand All @@ -37,7 +27,7 @@ endif()
# X11 for Linux/Unix
if(NOT WITHOUT_X11 AND UNIX AND NOT APPLE AND NOT HAIKU)
if(QT_VERSION_MAJOR EQUAL 5)
find_package(Qt5X11Extras "${QT5_MINIMUM_VERSION}" REQUIRED)
find_package(Qt5 "${QT5_MINIMUM_VERSION}" REQUIRED COMPONENTS X11Extras)
endif()
find_package(X11 REQUIRED)
endif()
Expand Down

0 comments on commit a4d5eab

Please sign in to comment.