1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-09 09:27:59 +00:00

Unix: conditionalise test_lineedit and test_terminal.

If we don't have GTK enabled in the build, then lots of important
stuff never gets added to the 'guiterminal' build-time object library,
without which these terminal-using programs can't link successfully,
even though they don't actually use GTK.

I could add yet more stub functions, but I don't think that's really
necessary - it doesn't seem like a serious inconvenience that you can
only test the terminal on a platform where you can also build real
applications that include it. So I've just moved those two executable
file definitions inside the Big If that conditionalises PuTTY and
pterm themselves.
This commit is contained in:
Simon Tatham 2023-07-26 08:11:29 +01:00
parent 5acaf757cf
commit d5b2fd9d2f

View File

@ -202,6 +202,24 @@ if(GTK_FOUND)
guiterminal eventloop otherbackends settings network charset utils
puttyxpms
${GTK_LIBRARIES} ${X11_LIBRARIES})
add_executable(test_lineedit
${CMAKE_SOURCE_DIR}/test/test_lineedit.c
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
${CMAKE_SOURCE_DIR}/stubs/no-logging.c
${CMAKE_SOURCE_DIR}/stubs/no-printing.c
${CMAKE_SOURCE_DIR}/stubs/no-storage.c
${CMAKE_SOURCE_DIR}/stubs/no-timing.c)
target_link_libraries(test_lineedit
guiterminal settings eventloop charset utils ${platform_libraries})
add_executable(test_terminal
${CMAKE_SOURCE_DIR}/test/test_terminal.c
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
${CMAKE_SOURCE_DIR}/stubs/no-storage.c
${CMAKE_SOURCE_DIR}/stubs/no-timing.c)
target_link_libraries(test_terminal
guiterminal settings eventloop charset utils ${platform_libraries})
endif()
# Pageant is built whether we have GTK or not; in its absence we
@ -226,21 +244,3 @@ target_link_libraries(pageant
eventloop console agent settings network crypto utils
${pageant_libs})
installed_program(pageant)
add_executable(test_lineedit
${CMAKE_SOURCE_DIR}/test/test_lineedit.c
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
${CMAKE_SOURCE_DIR}/stubs/no-logging.c
${CMAKE_SOURCE_DIR}/stubs/no-printing.c
${CMAKE_SOURCE_DIR}/stubs/no-storage.c
${CMAKE_SOURCE_DIR}/stubs/no-timing.c)
target_link_libraries(test_lineedit
guiterminal settings eventloop charset utils ${platform_libraries})
add_executable(test_terminal
${CMAKE_SOURCE_DIR}/test/test_terminal.c
${CMAKE_SOURCE_DIR}/stubs/no-gss.c
${CMAKE_SOURCE_DIR}/stubs/no-storage.c
${CMAKE_SOURCE_DIR}/stubs/no-timing.c)
target_link_libraries(test_terminal
guiterminal settings eventloop charset utils ${platform_libraries})