Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
144 changes: 85 additions & 59 deletions .github/workflows/linux-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
push:
workflow_dispatch:

jobs:
jobs:
build_ubuntu_2204_cmake:
runs-on: ubuntu-22.04

Expand All @@ -13,72 +13,98 @@ jobs:
QT_DIR: ${{ github.workspace }}/Qt

steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history and tags

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential cmake ninja-build libgl1-mesa-dev libxkbcommon-x11-0 libx11-dev

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
target: desktop
host: linux
arch: gcc_64
dir: ${{ env.QT_DIR }}
setup-python: false

- name: Configure with CMake
run: |
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history and tags

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
ninja-build \
libgl1-mesa-dev \
libglu1-mesa-dev \
libxkbcommon-x11-0 \
libxkbcommon-dev \
libx11-dev \
libxcb1-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-randr0-dev

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: ${{ env.QT_VERSION }}
target: desktop
host: linux
arch: gcc_64
modules: 'qtcharts qtshadertools'
dir: ${{ env.QT_DIR }}
setup-python: false

- name: Configure with CMake
run: |
cmake -S . -B build \
-DCMAKE_PREFIX_PATH="${{ env.QT_DIR }}/Qt/${{ env.QT_VERSION }}/gcc_64" \
-DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja

- name: Build
run: cmake --build build
- name: Build
run: cmake --build build

- name: Run CMake install (optional)
run: cmake --install build
- name: Run CMake install (optional)
run: cmake --install build

build_ubuntu_2204:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Cache Qt
id: cache-qt-6-4
uses: actions/cache@v3
with:
path: ../Qt/6.4.2
key: ${{ runner.os }}-QtCache-Qt6-4

- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
version: '6.4.2'
host: 'linux'
target: 'desktop'
install-deps: true
cached: ${{ steps.cache-qt-6-4.outputs.cache-hit }}
setup-python: true
tools: ''
tools-only: false

- name: Install needed xkbcommon symlink
run: sudo apt-get install libxkbcommon-dev -y

- name: Ubuntu and Qt version
run: |
cat /etc/issue
echo number of processors: $(nproc)
qmake -v
- name: qmake
run: qmake
- name: make
run: make -j$(nproc)
- uses: actions/checkout@v4

- name: Cache Qt
id: cache-qt-6-4
uses: actions/cache@v3
with:
path: ../Qt/6.4.2
key: ${{ runner.os }}-QtCache-Qt6-4

- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: '6.4.2'
host: 'linux'
target: 'desktop'
install-deps: true
modules: 'qtcharts qtshadertools'
cached: ${{ steps.cache-qt-6-4.outputs.cache-hit }}
setup-python: true
tools: ''
tools-only: false

- name: Install dependencies (Charts + X11)
run: |
sudo apt-get update
sudo apt-get install -y \
libgl1-mesa-dev \
libglu1-mesa-dev \
libxkbcommon-dev \
libxcb1-dev \
libxcb-render0-dev \
libxcb-shape0-dev \
libxcb-randr0-dev

- name: Ubuntu and Qt version
run: |
cat /etc/issue
echo number of processors: $(nproc)
qmake -v

- name: qmake
run: qmake

- name: make
run: make -j$(nproc)
2 changes: 2 additions & 0 deletions .github/workflows/windows-cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
target: desktop
host: windows
arch: win64_msvc2019_64
modules: 'qtcharts qtshadertools'
dir: ${{ env.QT_DIR }}
setup-python: false

Expand Down Expand Up @@ -75,6 +76,7 @@ jobs:
target: desktop
host: windows
arch: win64_mingw
modules: 'qtcharts qtshadertools'
dir: ${{ env.QT_DIR }}
tools: 'tools_mingw1310'
setup-python: false
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -385,5 +385,5 @@ MigrationBackup/
FodyWeavers.xsd
/ build
/Settings.ini
.vscode/settings.json
.vscode/
/.settings
1 change: 1 addition & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ add_subdirectory(autohidedragndrop)
add_subdirectory(emptydockarea)
add_subdirectory(dockindock)
add_subdirectory(configflags)
add_subdirectory(openGL)
1 change: 1 addition & 0 deletions examples/examples.pro
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SUBDIRS = \
autohidedragndrop \
centralwidget \
simple \
openGL \
hideshow \
sidebar \
deleteonclose \
Expand Down
115 changes: 115 additions & 0 deletions examples/openGL/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
cmake_minimum_required(VERSION 3.16)

project(OpenGLExample VERSION ${VERSION_SHORT})

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

find_package(
QT NAMES Qt6 Qt5
COMPONENTS Core
Gui
Widgets
Charts
OpenGLWidgets
Quick
QuickWidgets
ShaderTools
REQUIRED)

find_package(
Qt${QT_VERSION_MAJOR} 5.5
COMPONENTS Core
Gui
Widgets
Charts
OpenGLWidgets
Quick
QuickWidgets
ShaderTools
REQUIRED)

set(CMAKE_INCLUDE_CURRENT_DIR ON)

qt_add_executable(
${PROJECT_NAME}
WIN32
main.cpp
mainwindow.cpp
mainwindow.h
glwindow.cpp
glwindow.h
glwidget.h
glwidget.cpp
fbitem.cpp
fbitem.h
logo.cpp
logo.h)

target_include_directories(${PROJECT_NAME}
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../../src")
target_link_libraries(${PROJECT_NAME}
PRIVATE qtadvanceddocking-qt${QT_VERSION_MAJOR})

qt_add_qml_module(
${PROJECT_NAME}
VERSION ${VERSION_SHORT}
URI
fbitem
QML_FILES
"test.qml"
RESOURCE_PREFIX
/openGL
NO_RESOURCE_TARGET_PATH)

qt6_add_shaders(
${PROJECT_NAME}
"shaders"
PRECOMPILE
OPTIMIZED
PREFIX
"/openGL"
FILES
"wobble.frag")

# Resources:
set(resource_files "qtlogo.png")

qt_add_resources(${PROJECT_NAME} "OpenGLExample" PREFIX "/" FILES
${resource_files})

target_link_libraries(
${PROJECT_NAME}
PUBLIC Qt${QT_VERSION_MAJOR}::Core
Qt${QT_VERSION_MAJOR}::Gui
Qt${QT_VERSION_MAJOR}::Widgets
Qt${QT_VERSION_MAJOR}::Charts
Qt${QT_VERSION_MAJOR}::OpenGLWidgets
Qt${QT_VERSION_MAJOR}::Quick
Qt${QT_VERSION_MAJOR}::QuickWidgets)

set_target_properties(
${PROJECT_NAME}
PROPERTIES AUTOMOC ON
AUTORCC ON
AUTOUIC ON
CXX_STANDARD 14
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
VERSION ${VERSION_SHORT}
EXPORT_NAME "Qt Advanced Docking System OpenGL Example"
ARCHIVE_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
LIBRARY_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${ads_PlatformDir}/lib"
RUNTIME_OUTPUT_DIRECTORY
"${CMAKE_BINARY_DIR}/${ads_PlatformDir}/bin")

# Define include directories
target_include_directories(
${PROJECT_NAME}
PRIVATE $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/examples/openGL>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${INSTALL_NAME}>)

Loading