Skip to content

Commit 18b09d2

Browse files
committed
Use the same QsLog for trikRuntime and trik-studio when building trik-studio
1 parent 4b10ca2 commit 18b09d2

File tree

6 files changed

+30
-8
lines changed

6 files changed

+30
-8
lines changed

.github/workflows/common_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
os: macos-14
7474
build: true
7575
build_installer: true
76-
qmake_extra: " CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
76+
qmake_extra: "CONFIG+=use_same_qslog CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
7777
trik_python3_version_minor: 11
7878
tests: true
7979
secrets: inherit
@@ -160,7 +160,7 @@ jobs:
160160
build: true
161161
build_installer: true
162162
tests: true
163-
qmake_extra: "CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=warn_off"
163+
qmake_extra: "CONFIG+=use_same_qslog CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=warn_off"
164164
gcc_version: 13
165165
trik_qt_version: 5.15
166166
trik_python3_version_minor: 11

.github/workflows/windows_build_with_installer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ jobs:
133133
timeout-minutes: 1
134134
run: |
135135
cd ${{ env.BUILD_DIR }}
136-
qmake $GITHUB_WORKSPACE/studio.pro -spec win32-g++ CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=tests CONFIG+=noPch PYTHON_PATH="${pythonLocation}" PYTHON_VERSION=${{matrix.python-version}}
136+
qmake $GITHUB_WORKSPACE/studio.pro -spec win32-g++ CONFIG+=use_same_qslog CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=tests CONFIG+=noPch PYTHON_PATH="${pythonLocation}" PYTHON_VERSION=${{matrix.python-version}}
137137
138138
- name: QMake all
139139
timeout-minutes: 5

global.pri

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# limitations under the License.
1414

1515
!isEmpty(_PRO_FILE_):!isEmpty(CONFIG):isEmpty(GLOBAL_PRI_INCLUDED){
16-
#GLOBAL_PRI_INCLUDED = $$PWD
16+
GLOBAL_PRI_INCLUDED = $$PWD
1717

1818
CONFIG *= qt thread exceptions
1919

plugins/robots/thirdparty/trikRuntime/trikRuntime.pro

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ SUBDIRS += \
2929
mlx90640-library \
3030
# translations \
3131

32+
CONFIG(use_same_qslog) {
33+
trikRuntimeQsLog.file = $$GLOBAL_PRI_INCLUDED/thirdparty/qslog/qslog/QsLogSharedLibrary.pro
34+
EXTERNAL_SETTINGS = $$PWD/trikRuntimeExternal.pri
35+
cache(EXTERNAL_SETTINGS, set stash super)
36+
} else {
37+
trikRuntimeQsLog.file = $$PWD/trikRuntime/qslog/QsLogSharedLibrary.pro
38+
EXTERNAL_SETTINGS =
39+
cache(EXTERNAL_SETTINGS, set stash super)
40+
}
41+
3242
tests {
3343
SUBDIRS *= tests
3444
tests.depends = trikScriptRunner trikCommunicator trikKernel trikRuntimeQsLog
@@ -40,21 +50,19 @@ tests {
4050
trikScriptRunner.depends += PythonQt
4151
PythonQt.subdir = $$PWD/trikRuntime/PythonQt
4252
}
43-
trikRuntimeQsLog.file = $$PWD/trikRuntime/qslog/QsLogSharedLibrary.pro
4453
trikScriptRunner.subdir = $$PWD/trikRuntime/trikScriptRunner
4554
trikCommunicator.subdir = $$PWD/trikRuntime/trikCommunicator
4655
trikKernel.subdir = $$PWD/trikRuntime/trikKernel
4756
trikNetwork.subdir = $$PWD/trikRuntime/trikNetwork
4857
trikControl.subdir = $$PWD/trikRuntime/trikControl
4958
translations.subdir = $$PWD/trikRuntime/translations
5059
trikHal.subdir = $$PWD/trikRuntime/trikHal
51-
trikRuntimeQsLog.file = $$PWD/trikRuntime/qslog/QsLogSharedLibrary.pro
5260
mlx90640-library.subdir = $$PWD/trikRuntime/mlx90640-library
61+
5362
trikControl.depends = trikKernel trikHal mlx90640-library
5463
trikKernel.depends = trikRuntimeQsLog
5564
trikNetwork.depends = trikKernel
5665
trikScriptRunner.depends += trikControl trikKernel trikNetwork
5766
trikHal.depends = trikKernel
5867
trikCommunicator.depends = trikScriptRunner
59-
6068
OTHER_FILES += trikRuntime/trikRuntime.pro
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
defineTest(links) {
2+
LIBS *= -L$$GLOBAL_DESTDIR
3+
LIBS *= -L$$DESTDIR
4+
PROJECTS = $$1
5+
6+
for(PROJECT, PROJECTS) {
7+
contains(PROJECT, .*QsLog.*) {
8+
LIBS += -ltrikQsLog$$CONFIGURATION_SUFFIX
9+
} else {
10+
LIBS += -l$$PROJECT$$CONFIGURATION_SUFFIX
11+
}
12+
}
13+
export(LIBS)
14+
}

0 commit comments

Comments
 (0)