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

Move some add_executable() calls to top-level CMakeLists.

Now that the main source file of Plink in each platform directory has
the same name, we can put centralise the main definition of the
program in the main CMakeLists.txt, and in the platform directory,
just add the few extra modules needed to clear up platform-specific
details.

The same goes for psocks. And PSCP and PSFTP could have been moved to
the top level already - I just hadn't done it in the initial setup.
This commit is contained in:
Simon Tatham
2021-04-23 06:46:02 +01:00
parent f39c51f9a7
commit 77940f8fa3
6 changed files with 53 additions and 83 deletions

View File

@ -1,5 +1,3 @@
set(PLATFORM_SUBDIRS charset unix)
set(PUTTY_GSSAPI DYNAMIC
CACHE STRING "Build PuTTY with dynamically or statically linked \
Kerberos / GSSAPI support, if possible")
@ -80,6 +78,8 @@ add_optional_system_lib(m pow)
add_optional_system_lib(rt clock_gettime)
add_optional_system_lib(xnet socket)
set(extra_dirs charset)
if(PUTTY_GSSAPI STREQUAL DYNAMIC)
add_optional_system_lib(dl dlopen)
if(HAVE_NO_LIBdl)

View File

@ -1,5 +1,3 @@
set(PLATFORM_SUBDIRS windows)
set(PUTTY_MINEFIELD OFF
CACHE BOOL "Build PuTTY with its built-in memory debugger 'Minefield'")
set(PUTTY_GSSAPI ON

View File

@ -61,16 +61,20 @@ function(add_sources_from_current_dir target)
target_sources(${target} PRIVATE ${sources})
endfunction()
set(extra_dirs)
if(CMAKE_SYSTEM_NAME MATCHES "Windows" OR WINELIB)
include(cmake/platforms/windows.cmake)
set(platform windows)
else()
include(cmake/platforms/unix.cmake)
set(platform unix)
endif()
include(cmake/platforms/${platform}.cmake)
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${GENERATED_SOURCES_DIR}
${PLATFORM_SUBDIRS})
${platform}
${extra_dirs})
if(PUTTY_DEBUG)
add_compile_definitions(DEBUG)