update cmake files

This commit is contained in:
Bastian Bloessl
2016-01-08 02:02:02 -08:00
parent 17abd32ca9
commit 298d9823cc
7 changed files with 360 additions and 9 deletions
+1 -2
View File
@@ -185,7 +185,6 @@ function(GR_PYTHON_INSTALL)
COMPONENT ${GR_PYTHON_INSTALL_COMPONENT}
)
####################################################################
elseif(GR_PYTHON_INSTALL_PROGRAMS)
####################################################################
@@ -207,7 +206,7 @@ function(GR_PYTHON_INSTALL)
add_custom_command(
OUTPUT ${pyexefile} DEPENDS ${pyfile}
COMMAND ${PYTHON_EXECUTABLE} -c
"open('${pyexefile}','w').write('\#!${pyexe_native}\\n'+open('${pyfile}').read())"
"import re; R=re.compile('^\#!.*$\\n',flags=re.MULTILINE); open('${pyexefile}','w').write('\#!${pyexe_native}\\n'+R.sub('',open('${pyfile}','r').read()))"
COMMENT "Shebangin ${pyfile_name}"
VERBATIM
)