From 8ea8846c2601b73aa1ecb9e39065848e6f05d44e Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 23 Oct 2025 11:34:07 +0200 Subject: [PATCH 1/3] Raise CMake minimum version to 3.16 CMake 3.31 warns about compat. for <3.10 being removed in the future. Qt6 CMake modules already require 3.16 though, so it is a good base line. CMake 3.16 was released in 2019. Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 2 +- packages/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5890ca8a..7a4fba96 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ # The default is ON. ################################################ -cmake_minimum_required(VERSION 3.13) +cmake_minimum_required(VERSION 3.16) # Project info project(uchmviewer HOMEPAGE_URL "https://github.com/u-235/uchmviewer") diff --git a/packages/CMakeLists.txt b/packages/CMakeLists.txt index 53e71bd4..5e9d5de6 100644 --- a/packages/CMakeLists.txt +++ b/packages/CMakeLists.txt @@ -1,5 +1,5 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.16) if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") install(FILES freedesktop/uchmviewer.desktop DESTINATION ${APP_DEF_INSTALL_DIR}) From 0b6095face9ed80b746372e72a7d5a3b977dd5e5 Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 23 Oct 2025 12:13:23 +0200 Subject: [PATCH 2/3] Update Homepage throughout repository Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7a4fba96..5d9130c3 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ cmake_minimum_required(VERSION 3.16) # Project info -project(uchmviewer HOMEPAGE_URL "https://github.com/u-235/uchmviewer") +project(uchmviewer HOMEPAGE_URL "https://github.com/eBookProjects/uChmViewer") include(cmake/get-version.cmake) include(cmake/use-in.cmake) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2230192..4c7e8833 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,9 +9,9 @@ Have you found a bug? --------------------- * Ensure the bug was not already reported in the - [issues](https://github.com/u-235/uchmviewer/issues?q=type%3Aissue). + [issues](https://github.com/eBookProjects/uChmViewer/issues?q=type%3Aissue). * If you have not found an open issue that solves the problem, open - a [new one](https://github.com/u-235/uchmviewer/issues/new). Be sure + a [new one](https://github.com/eBookProjects/uChmViewer/issues/new). Be sure to include a title and a clear description with information to help reproduce the bug. Useful information may be: diff --git a/README.md b/README.md index 24bf189d..c254fab6 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ KchmViewer is written by [Georgy Yunaev](https://github.com/gyunaev), and is lic Fixed a bug causing false detection of an external link and displaying the “Open link in external program” dialog box. -Read more in the [release note](https://github.com/u-235/uchmviewer/releases/latest) and in the [news](NEWS.md). +Read more in the [release note](https://github.com/eBookProjects/uChmViewer/releases/latest) and in the [news](NEWS.md). ## Features From 5cc9a5ae9ceebd0d171fbe0fd5e1283fcce9171f Mon Sep 17 00:00:00 2001 From: Andreas Sturmlechner Date: Thu, 23 Oct 2025 11:56:57 +0200 Subject: [PATCH 3/3] Do not expand variables beforehand See also: https://invent.kde.org/plasma/libplasma/-/merge_requests/267 https://cmake.org/cmake/help/latest/command/if.html#variable-expansion https://cmake.org/cmake/help/latest/policy/CMP0054.html#policy:CMP0054 Signed-off-by: Andreas Sturmlechner --- CMakeLists.txt | 8 ++++---- lib/CMakeLists.txt | 4 ++-- packages/CMakeLists.txt | 4 ++-- po/CMakeLists.txt | 2 +- src/CMakeLists.txt | 6 +++--- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5d9130c3..48d7c4ce 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,7 +47,7 @@ find_package(libzip REQUIRED) set(APP_QT_MIN_VERSION 5.0) set(APP_QT_MODULES Core Network PrintSupport Widgets Xml) # Modules for WebKit or WebEngine. -if (${USE_WEBENGINE}) +if (USE_WEBENGINE) set(APP_QT_MIN_VERSION 5.9) list(APPEND APP_QT_MODULES WebEngineWidgets) target_link_libraries(extra INTERFACE Qt::WebEngineWidgets) @@ -71,18 +71,18 @@ endif () set(QT Qt${QT_VERSION_MAJOR}) # Since Qt 6 QTextCodec moved in the Qt 5 Core Compat module. -if (${QT_VERSION_MAJOR} GREATER_EQUAL 6) +if (QT_VERSION_MAJOR GREATER_EQUAL 6) list(APPEND APP_QT_MODULES Core5Compat) target_link_libraries(extra INTERFACE ${QT}::Core5Compat) endif () -if (${USE_DBUS}) +if (USE_DBUS) list(APPEND APP_QT_MODULES DBus) target_link_libraries(extra INTERFACE Qt::DBus) target_compile_definitions(extra INTERFACE USE_DBUS) endif () -if (${USE_MAC_APP}) +if (USE_MAC_APP) target_compile_definitions(extra INTERFACE USE_MAC_APP) endif () diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 666c7942..e808a574 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -1,8 +1,8 @@ -if (${USE_STATIC_CHMLIB}) +if (USE_STATIC_CHMLIB) set(CHMLIB_SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/CHMLib/src) - if (EXISTS ${CHMLIB_SRC_DIR}/chm_lib.h) + if (EXISTS "${CHMLIB_SRC_DIR}/chm_lib.h") add_library(chmlib STATIC ${CHMLIB_SRC_DIR}/chm_lib.c ${CHMLIB_SRC_DIR}/chm_lib.h diff --git a/packages/CMakeLists.txt b/packages/CMakeLists.txt index 5e9d5de6..46a5aeab 100644 --- a/packages/CMakeLists.txt +++ b/packages/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.16) -if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") +if (CMAKE_SYSTEM_NAME MATCHES "Linux") install(FILES freedesktop/uchmviewer.desktop DESTINATION ${APP_DEF_INSTALL_DIR}) install(DIRECTORY freedesktop/icons/ DESTINATION ${APP_ICONS_INSTALL_DIR}) elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND USE_MACOS_BUNDLE) @@ -26,7 +26,7 @@ if (USE_DEPLOY_RUNTIME) install(FILES $ DESTINATION ${APP_BIN_INSTALL_DIR}) endif () - if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") + if (CMAKE_SYSTEM_NAME MATCHES "Windows") # Copying runtime dependencies for Windows deployment # See https://doc.qt.io/qt-5/windows-deployment.html set(QT_DEPLOY_DIR ${CMAKE_CURRENT_BINARY_DIR}/qt-deploy) diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt index dc06efd3..9b45b0e1 100644 --- a/po/CMakeLists.txt +++ b/po/CMakeLists.txt @@ -36,7 +36,7 @@ endif () if (USE_GETTEXT) foreach (LANG ${LANGUAGES}) set(CATALOG ${CMAKE_CURRENT_SOURCE_DIR}/${CATALOG_NAME}_${LANG}.po) - if(EXISTS ${CATALOG}) + if(EXISTS "${CATALOG}") file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${LANG}/LC_MESSAGES) set(GMO_FILE ${CMAKE_CURRENT_BINARY_DIR}/${LANG}/LC_MESSAGES/${CATALOG_NAME}.mo) list(APPEND GMO_LIST ${GMO_FILE}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 392f6639..8711ae8c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -75,7 +75,7 @@ set(UIS window_browser.ui ) -if (${USE_WEBENGINE}) +if (USE_WEBENGINE) list(APPEND CPP_SOURCES qtwebengine/viewwindow.cpp qtwebengine/viewwindow.h @@ -93,13 +93,13 @@ else () list(APPEND MOC_HEADERS qtwebkit/viewwindow.h) endif () -if (${USE_DBUS}) +if (USE_DBUS) list(APPEND CPP_SOURCES dbus_interface.cpp dbus_interface.h) list(APPEND MOC_HEADERS dbus_interface.h) endif () # Mac OS specific -if (${USE_MAC_APP}) +if (USE_MAC_APP) list(APPEND CPP_SOURCES uchmviewerapp.cpp uchmviewerapp.h) list(APPEND MOC_HEADERS uchmviewerapp.h) endif ()