CMAKE: Do not strip lines when creating python resources

This commit is contained in:
Yorik van Havre
2024-05-07 11:30:13 +02:00
committed by Yorik van Havre
parent d8254996bf
commit a5e1f64d1f
2 changed files with 5 additions and 1 deletions

View File

@@ -262,7 +262,9 @@ MACRO(PYSIDE_WRAP_RC outfiles)
# we follow the tool command with in-place sed.
ADD_CUSTOM_COMMAND(OUTPUT "${outfile}"
COMMAND "${PYSIDE_RCC_EXECUTABLE}" ${RCCOPTIONS} "${infile}" ${PY_ATTRIBUTE} -o "${outfile}"
COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
# The line below sometimes catches unwanted lines too - but there is no date in the file
# anymore with Qt5 RCC, so commenting it out for now...
#COMMAND sed "/^# /d" "${outfile}" >"${outfile}.tmp" && mv "${outfile}.tmp" "${outfile}"
MAIN_DEPENDENCY "${infile}"
)
endif()

View File

@@ -1,3 +1,5 @@
#!/usr/bin/python
import os
txt = "<RCC>\n <qresource>\n"
cdir = os.path.dirname(__file__)