mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-02 03:52:49 -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:
@ -155,17 +155,19 @@ if(GTK_FOUND)
|
||||
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
||||
installed_program(pterm)
|
||||
|
||||
add_executable(ptermapp
|
||||
pterm.c
|
||||
main-gtk-application.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/nocmdline.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/nogss.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c
|
||||
pty.c)
|
||||
be_list(ptermapp pterm)
|
||||
target_link_libraries(ptermapp
|
||||
guiterminal eventloop settings charset utils
|
||||
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
||||
if(GTK_VERSION GREATER_EQUAL 3)
|
||||
add_executable(ptermapp
|
||||
pterm.c
|
||||
main-gtk-application.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/nocmdline.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/nogss.c
|
||||
${CMAKE_SOURCE_DIR}/proxy/nosshproxy.c
|
||||
pty.c)
|
||||
be_list(ptermapp pterm)
|
||||
target_link_libraries(ptermapp
|
||||
guiterminal eventloop settings charset utils
|
||||
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
||||
endif()
|
||||
|
||||
add_executable(putty
|
||||
putty.c
|
||||
@ -179,15 +181,17 @@ if(GTK_FOUND)
|
||||
PROPERTIES LINK_INTERFACE_MULTIPLICITY 2)
|
||||
installed_program(putty)
|
||||
|
||||
add_executable(puttyapp
|
||||
putty.c
|
||||
main-gtk-application.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/nocmdline.c)
|
||||
be_list(puttyapp PuTTY SSH SERIAL OTHERBACKENDS)
|
||||
target_link_libraries(puttyapp
|
||||
guiterminal eventloop sshclient otherbackends settings
|
||||
network crypto charset utils
|
||||
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
||||
if(GTK_VERSION GREATER_EQUAL 3)
|
||||
add_executable(puttyapp
|
||||
putty.c
|
||||
main-gtk-application.c
|
||||
${CMAKE_SOURCE_DIR}/stubs/nocmdline.c)
|
||||
be_list(puttyapp PuTTY SSH SERIAL OTHERBACKENDS)
|
||||
target_link_libraries(puttyapp
|
||||
guiterminal eventloop sshclient otherbackends settings
|
||||
network crypto charset utils
|
||||
${GTK_LIBRARIES} ${X11_LIBRARIES})
|
||||
endif()
|
||||
|
||||
add_executable(puttytel
|
||||
putty.c
|
||||
|
Reference in New Issue
Block a user