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

Rename one of my cmake support functions. (NFC)

add_platform_sources_to_library() is now called
add_sources_from_current_dir(), so that it will make sense when I use
it in subdirectories that aren't for a particular platform.
This commit is contained in:
Simon Tatham 2021-04-18 13:37:18 +01:00
parent 652ac53059
commit 70f6ce5628
3 changed files with 26 additions and 26 deletions

View File

@ -55,7 +55,7 @@ add_custom_target(cmake_commit_c
DEPENDS check_git_commit ${INTERMEDIATE_COMMIT_C}
COMMENT "Updating cmake_commit.c")
function(add_platform_sources_to_library target)
function(add_sources_from_current_dir target)
set(sources ${ARGN})
list(TRANSFORM sources PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/)
target_sources(${target} PRIVATE ${sources})

View File

@ -1,6 +1,6 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_platform_sources_to_library(utils
add_sources_from_current_dir(utils
utils/arm_arch_queries.c
utils/block_signal.c
utils/cloexec.c
@ -23,25 +23,25 @@ add_platform_sources_to_library(utils
# We want the ISO C implementation of ltime(), because we don't have
# a local better alternative
../utils/ltime.c)
add_platform_sources_to_library(eventloop
add_sources_from_current_dir(eventloop
uxcliloop.c uxsel.c)
add_platform_sources_to_library(console
add_sources_from_current_dir(console
uxcons.c)
add_platform_sources_to_library(settings
add_sources_from_current_dir(settings
uxstore.c)
add_platform_sources_to_library(network
add_sources_from_current_dir(network
uxnet.c uxfdsock.c uxagentsock.c uxpeer.c uxproxy.c ux_x11.c)
add_platform_sources_to_library(sshcommon
add_sources_from_current_dir(sshcommon
uxnoise.c)
add_platform_sources_to_library(sshclient
add_sources_from_current_dir(sshclient
uxgss.c uxagentc.c uxshare.c)
add_platform_sources_to_library(sshserver
add_sources_from_current_dir(sshserver
uxsftpserver.c procnet.c)
add_platform_sources_to_library(sftpclient
add_sources_from_current_dir(sftpclient
uxsftp.c)
add_platform_sources_to_library(otherbackends
add_sources_from_current_dir(otherbackends
uxser.c)
add_platform_sources_to_library(agent
add_sources_from_current_dir(agent
uxagentc.c)
add_executable(fuzzterm
@ -144,9 +144,9 @@ target_link_libraries(uppity
eventloop sshserver keygen settings network crypto utils)
if(GTK_FOUND)
add_platform_sources_to_library(utils
add_sources_from_current_dir(utils
gtkcols.c)
add_platform_sources_to_library(guiterminal
add_sources_from_current_dir(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

View File

@ -1,6 +1,6 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
add_platform_sources_to_library(utils
add_sources_from_current_dir(utils
utils/arm_arch_queries.c
utils/capi.c
utils/defaults.c
@ -28,27 +28,27 @@ add_platform_sources_to_library(utils
utils/win_strerror.c
winucs.c)
if(NOT HAVE_STRTOUMAX)
add_platform_sources_to_library(utils utils/strtoumax.c)
add_sources_from_current_dir(utils utils/strtoumax.c)
endif()
add_platform_sources_to_library(eventloop
add_sources_from_current_dir(eventloop
wincliloop.c winhandl.c)
add_platform_sources_to_library(console
add_sources_from_current_dir(console
winselcli.c winnohlp.c wincons.c)
add_platform_sources_to_library(settings
add_sources_from_current_dir(settings
winstore.c)
add_platform_sources_to_library(network
add_sources_from_current_dir(network
winnet.c winhsock.c winnpc.c winnps.c winproxy.c winx11.c)
add_platform_sources_to_library(sshcommon
add_sources_from_current_dir(sshcommon
winnoise.c)
add_platform_sources_to_library(sshclient
add_sources_from_current_dir(sshclient
winpgntc.c wingss.c winshare.c)
add_platform_sources_to_library(sftpclient
add_sources_from_current_dir(sftpclient
winsftp.c)
add_platform_sources_to_library(otherbackends
add_sources_from_current_dir(otherbackends
winser.c)
add_platform_sources_to_library(agent
add_sources_from_current_dir(agent
winpgntc.c)
add_platform_sources_to_library(guiterminal
add_sources_from_current_dir(guiterminal
windlg.c winctrls.c wincfg.c winprint.c winjump.c sizetip.c)
add_dependencies(guiterminal generated_licence_h) # windlg.c uses licence.h