Differential D7104 Diff 17675 recipes-kf5/tier1/ksyntaxhighlighting/0001-cross-compilation-support.patch
Changeset View
Changeset View
Standalone View
Standalone View
recipes-kf5/tier1/ksyntaxhighlighting/0001-cross-compilation-support.patch
- This file was added.
1 | commit de7828ae46f6feb9a219e9b1444e1d7e32bd94ac | ||||
---|---|---|---|---|---|
2 | Author: Volker Krause <vkrause@kde.org> | ||||
3 | Date: Thu Aug 3 19:47:59 2017 +0200 | ||||
4 | | ||||
5 | Add cross-compilation support for the highlighting indexer | ||||
6 | | ||||
7 | Reviewers: #frameworks | ||||
8 | | ||||
9 | Tags: #frameworks | ||||
10 | | ||||
11 | Differential Revision: https://phabricator.kde.org/D7102 | ||||
12 | | ||||
13 | diff --git a/src/indexer/CMakeLists.txt b/src/indexer/CMakeLists.txt | ||||
14 | index a2c7ef7..acb1647 100644 | ||||
15 | --- a/src/indexer/CMakeLists.txt | ||||
16 | +++ b/src/indexer/CMakeLists.txt | ||||
17 | @@ -1,7 +1,13 @@ | ||||
18 | -add_executable(katehighlightingindexer katehighlightingindexer.cpp) | ||||
19 | - | ||||
20 | -if(Qt5XmlPatterns_FOUND) | ||||
21 | - target_link_libraries(katehighlightingindexer Qt5::XmlPatterns) | ||||
22 | +if(CMAKE_CROSSCOMPILING AND KATEHIGHLIGHTINGINDEXER_EXECUTABLE) | ||||
23 | + # cross build, we need the indexer supplied externally | ||||
24 | + add_executable(katehighlightingindexer IMPORTED GLOBAL) | ||||
25 | + set_target_properties(katehighlightingindexer PROPERTIES IMPORTED_LOCATION ${KATEHIGHLIGHTINGINDEXER_EXECUTABLE}) | ||||
26 | else() | ||||
27 | - target_link_libraries(katehighlightingindexer Qt5::Core) | ||||
28 | + # host build | ||||
29 | + add_executable(katehighlightingindexer katehighlightingindexer.cpp) | ||||
30 | + if(Qt5XmlPatterns_FOUND) | ||||
31 | + target_link_libraries(katehighlightingindexer Qt5::XmlPatterns) | ||||
32 | + else() | ||||
33 | + target_link_libraries(katehighlightingindexer Qt5::Core) | ||||
34 | + endif() | ||||
35 | endif() |