1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-14 22:42:34 +02:00

Fix dependencies and compilation

This commit is contained in:
Elias Steurer 2023-08-04 15:22:31 +02:00
parent 994b0cd10a
commit b36b340762
5 changed files with 51 additions and 25 deletions

View File

@ -111,14 +111,17 @@ if(UNIX AND NOT APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold")
endif()
add_subdirectory(CMake)
add_subdirectory(ThirdParty)
# if(UNIX and not APPLE)
# # Needs to be append, because we include ecm as third party on linux
# list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
# else()
set(ECM_DIR "${THIRD_PARTY_PATH}/ecm")
add_subdirectory(CMake)
if(UNIX AND NOT APPLE)
# Needs to be append, because we include ecm as third party on linux
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
list(APPEND CMAKE_MODULE_PATH "${ECM_DIR}")
list(APPEND CMAKE_MODULE_PATH "${ECM_DIR}/cmake")
else()
# endif()
endif()
add_subdirectory(Tools)
add_subdirectory(ScreenPlay)

View File

@ -87,6 +87,7 @@ endif()
if(UNIX AND NOT APPLE)
find_package(ECM CONFIG REQUIRED NO_MODULE)
set(LayerShellQt "/usr/local/lib/x86_64-linux-gnu/cmake/LayerShellQt/")
find_package(LayerShellQt REQUIRED)
include(CopyRecursive)

View File

@ -1,12 +1,11 @@
// SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only
#include "linuxwaylandwindow.h"
#include <QScreen>
#include "qwaylandlayersurface.h"
#include "qwaylandlayershellintegration.h"
#include <QGuiApplication>
#include <LayerShellQt/Window>
#include <LayerShellQt/Shell>
ScreenPlay::WallpaperExitCode LinuxWaylandWindow::start()
{

View File

@ -20,18 +20,39 @@ add_subdirectory(qml-plausible)
add_subdirectory(QArchive)
if(UNIX AND NOT APPLE)
# FetchContent_Populate(
#FetchContent_Populate(
# ecm
# GIT_REPOSITORY https://github.com/KDE/extra-cmake-modules.git
# GIT_TAG ff820f0b556d169f210a1289b6bd67888ec492dd
# SOURCE_DIR ${THIRD_PARTY_PATH}/ecm)
# #add_subdirectory(ecm)
# list(APPEND CMAKE_MODULE_PATH "${THIRD_PARTY_PATH}/ecm/modules")
# GIT_REPOSITORY https://invent.kde.org/frameworks/extra-cmake-modules.git
# GIT_TAG 380397587ebc6206034ab3f9fb9bd94c028dfadb
# SOURCE_DIR ${THIRD_PARTY_PATH}/ecm)
#add_subdirectory(ecm)
#list(APPEND CMAKE_MODULE_PATH "${THIRD_PARTY_PATH}/ecm/modules")
#list(APPEND CMAKE_MODULE_PATH "${CMAKE_BINARY_DIR}/ThirdParty/ecm")
#set(ECM_DIR "${THIRD_PARTY_PATH}/ecm/build")
#set(ECM_DIR "${CMAKE_BINARY_DIR}/ThirdParty/ecm")
# FetchContent_Populate(
# layer-shell-qt
# GIT_REPOSITORY https://invent.kde.org/plasma/layer-shell-qt.git
# GIT_TAG d6aeaef1dc89b6b5ada0a835bf46d9adaee4838a
# SOURCE_DIR ${THIRD_PARTY_PATH}/layer-shell-qt)
# add_subdirectory(layer-shell-qt)
# cd ecm
# mkdir build
# cd build
# cmake configure ../ .
# cmake build
# sudo make install
# cd ..
# cd layer-shell-qt
# mkdir build
# cd build
# sudo apt-get install libwayland-dev wayland-protocols
# cmake configure ../ . -DCMAKE_PREFIX_PATH=/home/kelteseth/Code/Qt/ScreenPlay/../aqt/6.5.2/gcc_64
# cmake build ../
# sudo make install
# FetchContent_Populate(
# layer-shell-qt
# GIT_REPOSITORY https://invent.kde.org/plasma/layer-shell-qt.git
# GIT_TAG d6aeaef1dc89b6b5ada0a835bf46d9adaee4838a
# SOURCE_DIR ${THIRD_PARTY_PATH}/layer-shell-qt)
add_subdirectory(layer-shell-qt)
endif()

View File

@ -44,16 +44,18 @@ class commands_list():
def download(aqt_path: Path, qt_platform: Path):
qt_packages = ""
if system() == "Windows":
os = "windows"
elif system() == "Darwin":
os = "mac"
elif system() == "Linux":
qt_packages = "qtwaylandcompositor "
os = "linux"
# python -m aqt list-qt windows desktop --modules 6.5.2 win64_msvc2019_64
qt_packages = "qt3d qtquick3d qtconnectivity qt5compat qtimageformats qtmultimedia qtshadertools qtwebchannel qtwebengine qtwebsockets qtwebview qtpositioning"
# Windows: python -m aqt list-qt windows desktop --modules 6.5.2 win64_msvc2019_64
# Linux: python3 -m aqt list-qt linux desktop --modules 6.5.2 gcc_64
qt_packages += "qt3d qtquick3d qtconnectivity qt5compat qtimageformats qtmultimedia qtshadertools qtwebchannel qtwebengine qtwebsockets qtwebview qtpositioning"
print(f"Downloading: {qt_packages} to {aqt_path}")
execute(f"{defines.PYTHON_EXECUTABLE} -m aqt install-qt -O {aqt_path} {os} desktop {defines.QT_VERSION} {qt_platform} -m {qt_packages}")