Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
VideoLAN
VLMC
Commits
ea7d408e
Commit
ea7d408e
authored
Jan 17, 2010
by
Ludovic Fauvet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: automatically build resources-ts.qrc
parent
fb4af655
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
src/CMakeLists.txt
src/CMakeLists.txt
+1
-1
ts/CMakeLists.txt
ts/CMakeLists.txt
+10
-0
No files found.
src/CMakeLists.txt
View file @
ea7d408e
...
...
@@ -210,7 +210,7 @@ SET(VLMC_UIS
SET
(
VLMC_RCC
../ressources.qrc
../ressources-ts.qrc
../
ts/
ressources-ts.qrc
)
#include paths for vlmc
...
...
ts/CMakeLists.txt
View file @
ea7d408e
## RCC file
SET
(
TS_QRC
${
CMAKE_SOURCE_DIR
}
/ts/ressources-ts.qrc
)
IF
(
NOT QT_LUPDATE_EXECUTABLE
)
MESSAGE
(
WARNING
"VLMC could not find lupdate. You won't be able to update translations."
)
ENDIF
(
NOT QT_LUPDATE_EXECUTABLE
)
IF
(
NOT QT_LRELEASE_EXECUTABLE
)
MESSAGE
(
WARNING
"VLMC could not find lrelease. Your build won't contain translations."
)
## Create an empty RCC file
FILE
(
WRITE
${
TS_QRC
}
"<RCC></RCC>"
)
ENDIF
(
NOT QT_LRELEASE_EXECUTABLE
)
## Wraps the supplied .ts files in lrelease commands
MACRO
(
QT4_ADD_TRANSLATIONS outfiles
)
FILE
(
WRITE
${
TS_QRC
}
"<RCC><qresource prefix=
\"
ts
\"
>
\n
"
)
FOREACH
(
it
${
ARGN
}
)
GET_FILENAME_COMPONENT
(
it
${
it
}
ABSOLUTE
)
GET_FILENAME_COMPONENT
(
outfile
${
it
}
NAME_WE
)
FILE
(
APPEND
${
TS_QRC
}
"<file>
${
outfile
}
.qm</file>
\n
"
)
SET
(
outfile
${
CMAKE_SOURCE_DIR
}
/ts/
${
outfile
}
.qm
)
ADD_CUSTOM_COMMAND
(
...
...
@@ -24,6 +33,7 @@ MACRO(QT4_ADD_TRANSLATIONS outfiles)
SET
(
${
outfiles
}
${${
outfiles
}}
${
outfile
}
)
ENDFOREACH
(
it
)
FILE
(
APPEND
${
TS_QRC
}
"</qresource></RCC>"
)
ENDMACRO
(
QT4_ADD_TRANSLATIONS
)
## Collect all translations files
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment