Warning, /frameworks/kdelibs4support/cmake/modules/kde4_exec_via_sh.cmake is written in an unsupported language. File is not indexed.

0001 
0002 # Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
0003 #
0004 # Redistribution and use is allowed according to the terms of the BSD license.
0005 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
0006 
0007 
0008 if (UNIX)
0009 
0010 file(WRITE "${_filename}" 
0011 "#!/bin/sh
0012 # created by cmake, don't edit, changes will be lost
0013 
0014 ${_library_path_variable}=${_ld_library_path}\${${_library_path_variable}:+:\$${_library_path_variable}} \"${_executable}\" \"$@\"
0015 ")
0016 
0017 # make it executable
0018 # since this is only executed on UNIX, it is safe to call chmod
0019 exec_program(chmod ARGS ug+x \"${_filename}\" OUTPUT_VARIABLE _dummy )
0020 
0021 else (UNIX)
0022 
0023 file(TO_NATIVE_PATH "${_ld_library_path}" win_path)
0024 
0025 file(WRITE "${_filename}" 
0026 "
0027 set PATH=${win_path};$ENV{PATH}
0028 \"${_executable}\" %*
0029 ")
0030 
0031 endif (UNIX)