Skip to content

Commit 940c139

Browse files
authored
Merge pull request #7 from qualcomm/feature/refactor
project refactor - cmake build system
2 parents 79a96cb + 6687924 commit 940c139

729 files changed

Lines changed: 2920 additions & 30629 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/build.yml

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
name: CMake Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build-linux:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
os: [ubuntu-22.04, ubuntu-latest]
12+
qt_version: ['6.9.2', '6.10.0']
13+
build_type: [Debug, Release]
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Install dependencies
19+
run: |
20+
sudo apt-get update
21+
sudo apt-get install -y \
22+
build-essential \
23+
ninja-build \
24+
libgl1-mesa-dev \
25+
mesa-common-dev \
26+
libxkbcommon-x11-0 \
27+
libxcb-xinerama0-dev \
28+
libxcb-cursor-dev \
29+
libxcb-icccm4-dev \
30+
libxcb-keysyms1-dev \
31+
libxcb-randr0-dev \
32+
libxcb-render-util0-dev \
33+
libusb-1.0-0-dev \
34+
libusb-dev \
35+
uuid-dev \
36+
libpulse-dev \
37+
python3-pip
38+
39+
- name: Set Qt install path
40+
run: |
41+
echo "QT_ROOT_DIR=${{ github.workspace }}/${{ matrix.qt_version }}/gcc_64" >> $GITHUB_ENV
42+
echo "${{ github.workspace }}/${{ matrix.qt_version }}/gcc_64/bin" >> $GITHUB_PATH
43+
44+
- name: Cache Qt ${{ matrix.qt_version }}
45+
id: cache-qt
46+
uses: actions/cache@v4
47+
with:
48+
path: ${{ env.QT_ROOT_DIR }}
49+
key: ${{ runner.os }}-qt-${{ matrix.qt_version }}
50+
51+
- name: Install Qt ${{ matrix.qt_version }}
52+
if: steps.cache-qt.outputs.cache-hit != 'true'
53+
run: |
54+
pip install aqtinstall
55+
aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64
56+
aqt install-qt linux desktop ${{ matrix.qt_version }} linux_gcc_64 -m qtmultimedia qtserialport
57+
58+
- name: Configure CMake (${{ matrix.build_type }})
59+
run: |
60+
cmake -B build \
61+
-G Ninja \
62+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
63+
-DCMAKE_PREFIX_PATH="${{ env.QT_ROOT_DIR }}/lib/cmake"
64+
65+
- name: Build (${{ matrix.build_type }})
66+
run: cmake --build build --config ${{ matrix.build_type }}
67+
68+
build-windows:
69+
runs-on: windows-2022
70+
strategy:
71+
matrix:
72+
qt_version: ['6.9.2', '6.10.0']
73+
build_type: [Debug, Release]
74+
75+
steps:
76+
- uses: actions/checkout@v4
77+
78+
- name: Set Qt install path
79+
shell: pwsh
80+
run: |
81+
$qtRoot = "C:\Qt\${{ matrix.qt_version }}\msvc2022_64"
82+
echo "QT_ROOT_DIR=$qtRoot" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
83+
echo "$qtRoot\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
84+
85+
- name: Cache Qt ${{ matrix.qt_version }}
86+
id: cache-qt
87+
uses: actions/cache@v4
88+
with:
89+
path: ${{ env.QT_ROOT_DIR }}
90+
key: ${{ runner.os }}-qt-${{ matrix.qt_version }}
91+
92+
- name: Install Qt ${{ matrix.qt_version }}
93+
if: steps.cache-qt.outputs.cache-hit != 'true'
94+
shell: pwsh
95+
run: |
96+
pip install aqtinstall
97+
aqt install-qt windows desktop ${{ matrix.qt_version }} win64_msvc2022_64 `
98+
--outputdir "C:\Qt" `
99+
-m qtserialport qtmultimedia qtactiveqt
100+
101+
- name: Configure CMake (${{ matrix.build_type }})
102+
shell: pwsh
103+
run: |
104+
cmake -B build `
105+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
106+
-DCMAKE_PREFIX_PATH="$env:QT_ROOT_DIR\lib\cmake"
107+
108+
- name: Build (${{ matrix.build_type }})
109+
shell: pwsh
110+
run: cmake --build build --config ${{ matrix.build_type }} --parallel

.github/workflows/qcom-preflight-checks.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ name: QC Preflight Checks
33
on:
44
pull_request:
55
push:
6-
branches: [main, develop]
6+
branches:
7+
- main
8+
- develop
9+
- feature/*
10+
- bugfix/*
11+
- update/*
712
workflow_dispatch:
813

914
jobs:

.gitignore

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,12 @@
1818
*.exe
1919
*.qik
2020

21-
TelematicsExample/
22-
TelematicsClient/
23-
2421
# Python build and cache directories
2522
Python/build
2623
Python/dist
2724
__pycache__/
2825
.pytest_cache/
2926

30-
3127
# Java compiled sources
3228
**/target/
3329
*.class
@@ -38,13 +34,13 @@ EPMDevInterop/obj/
3834
TACDevInterop/obj/
3935

4036
# Qt build files
41-
*.pro.user
37+
.qtcreator/
4238
Makefile*
4339
build/
4440
moc_*
4541
qrc_*
4642
ui_*
47-
*.qmake.stash
43+
CMakeLists.txt.user
4844

4945
# Qt build directories
5046
__Builds/x64/Debug/
@@ -58,14 +54,9 @@ __Builds/x64/ExtRelease/
5854

5955
# Examples build directories
6056
Examples/C\+\+/EPMExample/x64/Debug/
61-
Examples/C#/TACExample/ConsoleApplication.exe.config
62-
Examples/C#/TACExample/obj/
6357

6458
# documentation
6559
__Builds/docs/
6660

6761
# driver packages
6862
*.zip
69-
lib/ftd2xx.lib
70-
71-
Troubleshooter/

CMakeLists.txt

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
# SPDX-License-Identifier: BSD-3-Clause
3+
4+
cmake_minimum_required(VERSION 3.16)
5+
project(QEPM-Workspace VERSION 1.0 LANGUAGES CXX)
6+
7+
set(CMAKE_AUTOUIC ON)
8+
set(CMAKE_AUTOMOC ON)
9+
set(CMAKE_AUTORCC ON)
10+
11+
set(CMAKE_CXX_STANDARD 20)
12+
set(CMAKE_INCLUDE_CURRENT_DIR ON)
13+
14+
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Core Multimedia)
15+
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Concurrent Gui Multimedia MultimediaWidgets Network PrintSupport SerialPort Widgets Xml OpenGL OpenGLWidgets Svg)
16+
if(WIN32)
17+
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS AxContainer)
18+
endif()
19+
20+
qt_standard_project_setup(REQUIRES 6.9)
21+
22+
add_subdirectory(third-party)
23+
add_subdirectory(src/libraries)
24+
add_subdirectory(src/applications)
25+
add_subdirectory(interfaces)
26+
add_subdirectory(examples)

Docs/open-project-files.png

-74.6 KB
Binary file not shown.

Docs/qepm-overview.drawio.png

-30.8 KB
Binary file not shown.

Docs/qt-project-setup.png

-96.4 KB
Binary file not shown.

EPMDev/EPMDevDemo/EPMDevDemo.pro

Lines changed: 0 additions & 63 deletions
This file was deleted.

LibExcel/LibExcel.pro

Lines changed: 0 additions & 40 deletions
This file was deleted.

PowerChart/AlpacaDataSeries.cpp

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)