aboutsummaryrefslogtreecommitdiff
path: root/modules/kde4_exec_via_sh.cmake
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2006-04-08 20:05:12 +0000
committerAlexander Neundorf <neundorf@kde.org>2006-04-08 20:05:12 +0000
commit708473aa3339b90f03c8f774b5067dba64cc92f1 (patch)
tree3edac2ba66d19937763c8db27ebdc44b8b45f71b /modules/kde4_exec_via_sh.cmake
parentabdca3e2a38cf7e8fe615823ced9b194478948b7 (diff)
downloadextra-cmake-modules-708473aa3339b90f03c8f774b5067dba64cc92f1.tar.gz
extra-cmake-modules-708473aa3339b90f03c8f774b5067dba64cc92f1.tar.bz2
-generate the shell-wrappers for the executables during buildtime instead of cmake time, and remove them when "cleaning"
Alex svn path=/trunk/KDE/kdelibs/; revision=527599
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 )