aboutsummaryrefslogtreecommitdiff
path: root/modules/kde4_exec_via_sh.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'modules/kde4_exec_via_sh.cmake')
-rwxr-xr-xmodules/kde4_exec_via_sh.cmake11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/kde4_exec_via_sh.cmake b/modules/kde4_exec_via_sh.cmake
index 148f87e7..e3eb8328 100755
--- a/modules/kde4_exec_via_sh.cmake
+++ b/modules/kde4_exec_via_sh.cmake
@@ -1,6 +1,11 @@
-#!/bin/sh
-# created by cmake, don't edit, changes will be lost
+file(WRITE "${_filename}"
+"#!/bin/sh
+# created by cmake, don't edit, changes will be lost
-${_library_path_variable}="${_ld_library_path}":$${_library_path_variable} ${_executable} $@
+${_library_path_variable}=\"${_ld_library_path}\":$${_library_path_variable} ${_executable} $@
+")
+# make it executable
+# since this is only executed on UNIX, it is safe to call chmod
+exec_program(chmod ARGS 755 "${_filename}" OUTPUT_VARIABLE _dummy )