set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) add_platform_sources_to_library(utils uxutils.c uxsignal.c uxpoll.c xkeysym.c uxmisc.c xpmpucfg.c xpmputty.c xpmptcfg.c xpmpterm.c x11misc.c ../time.c) add_platform_sources_to_library(eventloop uxcliloop.c uxsel.c) add_platform_sources_to_library(console uxcons.c) add_platform_sources_to_library(settings uxstore.c) add_platform_sources_to_library(network uxnet.c uxfdsock.c uxagentsock.c uxpeer.c uxproxy.c) add_platform_sources_to_library(sshcommon uxnoise.c ux_x11.c) add_platform_sources_to_library(sshclient uxgss.c uxagentc.c uxshare.c) add_platform_sources_to_library(sshserver uxsftpserver.c procnet.c) add_platform_sources_to_library(sftpclient uxsftp.c) add_platform_sources_to_library(otherbackends uxser.c) add_platform_sources_to_library(agent uxagentc.c) add_executable(fuzzterm ${CMAKE_SOURCE_DIR}/fuzzterm.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/logging.c ${CMAKE_SOURCE_DIR}/noprint.c uxucs.c uxnogtk.c) add_dependencies(fuzzterm generated_licence_h) target_link_libraries(fuzzterm guiterminal eventloop charset settings utils) add_executable(osxlaunch osxlaunch.c) add_executable(plink uxplink.c ${CMAKE_SOURCE_DIR}/be_all_s.c uxnogtk.c) target_link_libraries(plink eventloop noterminal console sshclient otherbackends settings network crypto utils) installed_program(plink) add_executable(pscp ${CMAKE_SOURCE_DIR}/pscp.c ${CMAKE_SOURCE_DIR}/be_ssh.c uxnogtk.c) target_link_libraries(pscp sftpclient eventloop console sshclient settings network crypto utils) installed_program(pscp) add_executable(psftp ${CMAKE_SOURCE_DIR}/psftp.c ${CMAKE_SOURCE_DIR}/be_ssh.c uxnogtk.c) target_link_libraries(psftp sftpclient eventloop console sshclient settings network crypto utils) installed_program(psftp) add_executable(psocks uxsocks.c ${CMAKE_SOURCE_DIR}/psocks.c ${CMAKE_SOURCE_DIR}/norand.c ${CMAKE_SOURCE_DIR}/nocproxy.c ${CMAKE_SOURCE_DIR}/portfwd.c uxnogtk.c) target_link_libraries(psocks eventloop console network utils) add_executable(psusan uxpsusan.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/nogss.c ${CMAKE_SOURCE_DIR}/scpserver.c uxnogtk.c uxpty.c) target_link_libraries(psusan eventloop sshserver keygen settings network crypto utils) installed_program(psusan) add_library(puttygen-common OBJECT ${CMAKE_SOURCE_DIR}/notiming.c uxgen.c uxnogtk.c uxnoise.c uxstore.c ${CMAKE_SOURCE_DIR}/sshpubk.c ${CMAKE_SOURCE_DIR}/sshrand.c) add_executable(puttygen ${CMAKE_SOURCE_DIR}/cmdgen.c) target_link_libraries(puttygen puttygen-common keygen console crypto utils) installed_program(puttygen) add_executable(cgtest ${CMAKE_SOURCE_DIR}/cgtest.c) target_link_libraries(cgtest puttygen-common keygen console crypto utils) add_executable(testsc ${CMAKE_SOURCE_DIR}/testsc.c) target_link_libraries(testsc crypto utils) add_executable(testzlib ${CMAKE_SOURCE_DIR}/testzlib.c ${CMAKE_SOURCE_DIR}/sshzlib.c) target_link_libraries(testzlib utils) add_executable(uppity uxserver.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/scpserver.c uxnogtk.c uxpty.c ${CMAKE_SOURCE_DIR}/nogss.c) target_link_libraries(uppity eventloop sshserver keygen settings network crypto utils) if(GTK_FOUND) add_platform_sources_to_library(utils gtkcols.c) add_platform_sources_to_library(guiterminal gtkwin.c gtkfont.c gtkdlg.c gtkcfg.c gtkcomm.c uxcfg.c uxucs.c uxprint.c) add_dependencies(guiterminal generated_licence_h) # gtkdlg.c uses licence.h add_library(guimisc STATIC gtkmisc.c) add_executable(pageant uxpgnt.c ${CMAKE_SOURCE_DIR}/be_misc.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/nogss.c gtkask.c ux_x11.c uxnoise.c ${CMAKE_SOURCE_DIR}/x11fwd.c) target_link_libraries(pageant guimisc eventloop console agent settings network crypto utils ${GTK_LIBRARIES}) installed_program(pageant) add_executable(pterm uxpterm.c gtkmain.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/nogss.c uxpty.c) target_link_libraries(pterm guiterminal guimisc eventloop settings charset utils ${GTK_LIBRARIES} ${X11_LIBRARIES}) installed_program(pterm) add_executable(ptermapp uxpterm.c gtkapp.c ${CMAKE_SOURCE_DIR}/nocmdline.c ${CMAKE_SOURCE_DIR}/be_none.c ${CMAKE_SOURCE_DIR}/nogss.c uxpty.c) target_link_libraries(ptermapp guiterminal guimisc eventloop settings charset utils ${GTK_LIBRARIES} ${X11_LIBRARIES}) add_executable(putty uxputty.c gtkmain.c ${CMAKE_SOURCE_DIR}/be_all_s.c) target_link_libraries(putty guiterminal guimisc eventloop sshclient otherbackends settings network crypto charset utils ${GTK_LIBRARIES} ${X11_LIBRARIES}) set_target_properties(putty PROPERTIES LINK_INTERFACE_MULTIPLICITY 2) installed_program(putty) add_executable(puttyapp uxputty.c gtkapp.c ${CMAKE_SOURCE_DIR}/nocmdline.c ${CMAKE_SOURCE_DIR}/be_all_s.c) target_link_libraries(puttyapp guiterminal guimisc eventloop sshclient otherbackends settings network crypto charset utils ${GTK_LIBRARIES} ${X11_LIBRARIES}) add_executable(puttytel uxputty.c gtkmain.c ${CMAKE_SOURCE_DIR}/be_nos_s.c ${CMAKE_SOURCE_DIR}/nogss.c ${CMAKE_SOURCE_DIR}/norand.c ${CMAKE_SOURCE_DIR}/nocproxy.c) target_link_libraries(puttytel guiterminal guimisc eventloop otherbackends settings network charset utils ${GTK_LIBRARIES} ${X11_LIBRARIES}) endif()