diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2020-07-14 16:04:56 +0200 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2020-07-14 16:04:56 +0200 |
commit | 9f78677281b8866a28af469dc7f437771f2a1b8f (patch) | |
tree | 24adc110502306655a746426815b0f11ea406538 /CMake | |
parent | f21ca6d73dacc277e0b3d7a8fa15b2c30633d3ae (diff) |
CMake: Rename add_slaves() to add_links()
Sorry!
Diffstat (limited to 'CMake')
-rw-r--r-- | CMake/Misc.cmake | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/CMake/Misc.cmake b/CMake/Misc.cmake index 6ad0b9479..8cb18b6ac 100644 --- a/CMake/Misc.cmake +++ b/CMake/Misc.cmake @@ -51,17 +51,17 @@ function(add_vendor_file) endfunction() # Add symbolic links to a file -function(add_slaves destination master) - set(slaves "") - foreach(slave ${ARGN}) - add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${slave} - COMMAND ${CMAKE_COMMAND} -E create_symlink ${master} ${CMAKE_CURRENT_BINARY_DIR}/${slave}) - list(APPEND slaves ${CMAKE_CURRENT_BINARY_DIR}/${slave}) +function(add_links directory target) + set(link_names "") + foreach(link_name ${ARGN}) + add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${link_name} + COMMAND ${CMAKE_COMMAND} -E create_symlink ${target} ${CMAKE_CURRENT_BINARY_DIR}/${link_name}) + list(APPEND link_names ${CMAKE_CURRENT_BINARY_DIR}/${link_name}) endforeach() - STRING(REPLACE "/" "-" master "${master}") - add_custom_target(${master}-slaves ALL DEPENDS ${slaves}) - install(FILES ${slaves} DESTINATION ${destination}) + STRING(REPLACE "/" "-" target "${target}") + add_custom_target(${target}-link_names ALL DEPENDS ${link_names}) + install(FILES ${link_names} DESTINATION ${directory}) endfunction() # Generates a simple version script versioning everything with current SOVERSION |