Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linphone-desktop
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
linphone-desktop
Commits
69897ef3
Commit
69897ef3
authored
Oct 19, 2016
by
Ronan Abhamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(CMakeLists.txt): `check_qml` is executed before `update_translations`
parent
f269bda9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
17 deletions
+27
-17
CMakeLists.txt
tests/CMakeLists.txt
+26
-0
CMakeLists.txt
tests/languages/CMakeLists.txt
+0
-16
check_qml
tests/tools/check_qml
+1
-1
No files found.
tests/CMakeLists.txt
View file @
69897ef3
...
...
@@ -75,6 +75,30 @@ PREPEND(SOURCES "${CMAKE_SOURCE_DIR}/")
PREPEND
(
HEADERS
"
${
CMAKE_SOURCE_DIR
}
/"
)
PREPEND
(
QRC_RESOURCES
"
${
CMAKE_SOURCE_DIR
}
/"
)
# --------------------------------------------------------------------
# Compute QML files list.
# --------------------------------------------------------------------
set
(
QML_SOURCES
)
file
(
STRINGS
${
QRC_RESOURCES
}
QRC_RESOURCES_CONTENT
)
foreach
(
line
${
QRC_RESOURCES_CONTENT
}
)
set
(
result
)
string
(
REGEX REPLACE
"^[
\t
]*<[
\t
]*file[
\t
]*>[
\t
]*(.+
\\
.qml)[
\t
]*<[
\t
]*/[
\t
]*file[
\t
]*>[
\t
]*$"
"
\\
1"
result
${
line
}
)
string
(
REGEX MATCH
"qml$"
isQml
${
result
}
)
if
(
NOT
${
isQml
}
STREQUAL
""
)
list
(
APPEND QML_SOURCES
"
${
CMAKE_SOURCE_DIR
}
/
${
result
}
"
)
endif
()
endforeach
()
add_custom_target
(
check_qml DEPENDS
${
QML_SOURCES
}
COMMAND
"
${
CMAKE_SOURCE_DIR
}
/tools/check_qml"
)
# --------------------------------------------------------------------
# Init git hooks.
# --------------------------------------------------------------------
...
...
@@ -98,6 +122,8 @@ list(APPEND QRC_RESOURCES "${CMAKE_BINARY_DIR}/${LANGUAGES_DIRECTORY}/${I18N_FIL
qt5_add_resources
(
RESOURCES
${
QRC_RESOURCES
}
)
# Build.
# Note: `update_translations` is provided by `languages/CMakeLists.txt`.
add_executable
(
${
LINPHONE_EXEC
}
${
SOURCES
}
${
HEADERS
}
${
RESOURCES
}
)
add_dependencies
(
${
LINPHONE_EXEC
}
update_translations
)
add_dependencies
(
update_translations check_qml
)
target_link_libraries
(
${
LINPHONE_EXEC
}
${
LIBS
}
)
tests/languages/CMakeLists.txt
View file @
69897ef3
...
...
@@ -24,22 +24,6 @@ set(I18N_CONTENT "${I18N_CONTENT} </qresource>\n</RCC>\n")
file
(
WRITE
"
${
CMAKE_BINARY_DIR
}
/
${
LANGUAGES_DIRECTORY
}
/
${
I18N_FILENAME
}
"
"
${
I18N_CONTENT
}
"
)
# Compute QML files list.
set
(
QML_SOURCES
)
file
(
STRINGS
${
QRC_RESOURCES
}
QRC_RESOURCES_CONTENT
)
foreach
(
line
${
QRC_RESOURCES_CONTENT
}
)
set
(
result
)
string
(
REGEX REPLACE
"^[
\t
]+<file>[
\t
]*(.+
\\
.qml)[
\t
]*</file>[
\t
]*$"
"
\\
1"
result
${
line
}
)
string
(
REGEX MATCH
"qml$"
isQml
${
result
}
)
if
(
NOT
${
isQml
}
STREQUAL
""
)
list
(
APPEND QML_SOURCES
"
${
CMAKE_SOURCE_DIR
}
/
${
result
}
"
)
endif
()
endforeach
()
# Create `qm` files from `ts` files.
qt5_create_translation
(
QM_FILES
${
TS_FILES
}
${
SOURCES
}
${
HEADERS
}
${
QML_SOURCES
}
)
...
...
tests/tools/check_qml
View file @
69897ef3
...
...
@@ -22,7 +22,7 @@ while read line
do
result
=
$(
printf
"
$line
"
|
sed
-n
's/^\s*<\s*file\s*>\s*\(.*\.\(qml\|js\)\)\s*<\s*\/file\s*>\s*$/\1/p'
sed
-n
's/^\s*<\s*file\s*>\s*\(.*\.\(qml\|js\)\)\s*<\s*\/
\s*
file\s*>\s*$/\1/p'
)
if
[[
!
-z
$result
]]
&&
!
$LINTER
"
$result
"
;
then
so_far_so_good
=
1
...
...
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