Warning, /plasma/drkonqi/cmake/SystemctlEnable.cmake is written in an unsupported language. File is not indexed.

0001 # SPDX-License-Identifier: BSD-2-Clause
0002 # SPDX-FileCopyrightText: 2023 Harald Sitter <sitter@kde.org>
0003 
0004 function(systemctl_enable unit wantedby dir)
0005     set(wantedby_directory $ENV{DESTDIR}/${dir}/${wantedby}.wants/)
0006     file(MAKE_DIRECTORY ${wantedby_directory})
0007     execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../${unit} ${wantedby_directory}/${unit}
0008         RESULT_VARIABLE enable_result
0009         ERROR_VARIABLE enable_fail
0010         COMMAND_ECHO STDOUT)
0011     if(NOT enable_result EQUAL "0")
0012         message(FATAL_ERROR "Systemctl failed: ${enable_fail} ${ARGN}")
0013     endif()
0014 endfunction()