Skip to content
Snippets Groups Projects
Commit 4885c4eb authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Task #8629: Added macros lofar_add_bin_scripts(), and...

Task #8629: Added macros lofar_add_bin_scripts(), and lofar_add_sbin_scripts(), which can be used to add executable scripts to the build/install.
parent a215ffbd
No related branches found
No related tags found
No related merge requests found
......@@ -2,9 +2,11 @@
#
# Defines the following macros:
# lofar_add_bin_program(name)
# lofar_add_bin_scripts([name1 [name2 ..]])
# lofar_add_executable(name)
# lofar_add_library(name)
# lofar_add_sbin_program(name)
# lofar_add_sbin_scripts([name1 [name2 ..]])
# lofar_add_test(name)
# lofar_join_arguments(var)
# lofar_search_path(path package)
......@@ -48,6 +50,22 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED)
endmacro(lofar_add_bin_program)
# --------------------------------------------------------------------------
# lofar_add_bin_scripts([name1 [name2 ..]])
#
# Add scripts that need to be installed into the <prefix>/bin directory.
# Also create a symbolic link in <build-dir>/bin to each of these scripts.
# --------------------------------------------------------------------------
macro(lofar_add_bin_scripts)
foreach(_name ${ARGN})
get_filename_component(_abs_name ${_name} ABSOLUTE)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${_abs_name} ${CMAKE_BINARY_DIR}/bin/${_name})
install(PROGRAMS ${_name} DESTINATION bin)
endforeach(_name ${ARGN})
endmacro(lofar_add_bin_scripts)
# --------------------------------------------------------------------------
# lofar_add_executable(name)
#
......@@ -128,6 +146,22 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED)
endmacro(lofar_add_sbin_program)
# --------------------------------------------------------------------------
# lofar_add_sbin_scripts([name1 [name2 ..]])
#
# Add scripts that need to be installed into the <prefix>/sbin directory.
# Also create a symbolic link in <build-dir>/sbin to each of these scripts.
# --------------------------------------------------------------------------
macro(lofar_add_sbin_scripts)
foreach(_name ${ARGN})
get_filename_component(_abs_name ${_name} ABSOLUTE)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
${_abs_name} ${CMAKE_BINARY_DIR}/sbin/${_name})
install(PROGRAMS ${_name} DESTINATION sbin)
endforeach(_name ${ARGN})
endmacro(lofar_add_sbin_scripts)
# --------------------------------------------------------------------------
# lofar_add_test(name [source ...] [DEPENDS depend ...])
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment