1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-01 03:22:48 -05:00

Fix pre-GTK3 build failures in puttyapp / ptermapp.

These alternate frontends using the GtkApplication class don't work
before GTK3, because the GtkApplication class didn't exist. In the old
mkfiles.pl system, the simplest way to prevent a build failure was to
just compile them anyway but make them reduce to a stub main(). But
now, with the new library-based code organisation, library search
order issues mean that these applications won't build at all.

Happily, with cmake, it's also easy to simply omit these binaries from
the build completely depending on our GTK version.
This commit is contained in:
Simon Tatham
2021-12-18 11:43:57 +00:00
parent a759e303b0
commit 0e630bc4f1
3 changed files with 29 additions and 37 deletions

View File

@ -12,6 +12,9 @@ macro(try_pkg_config_gtk VER PACKAGENAME)
(PUTTY_GTK_VERSION STREQUAL ANY OR PUTTY_GTK_VERSION STREQUAL ${VER}))
find_package(PkgConfig)
pkg_check_modules(GTK ${PACKAGENAME})
if(GTK_FOUND)
set(GTK_VERSION ${VER})
endif()
endif()
endmacro()
try_pkg_config_gtk(3 gtk+-3.0)