diff --git a/CMakeLists.txt b/CMakeLists.txt index 6a3c7165..853bb589 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/ScreenPlayWallpaper/CMakeLists.txt b/ScreenPlayWallpaper/CMakeLists.txt index d8c5fe3d..2fc48c28 100644 --- a/ScreenPlayWallpaper/CMakeLists.txt +++ b/ScreenPlayWallpaper/CMakeLists.txt @@ -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) diff --git a/ScreenPlayWallpaper/src/linuxwaylandwindow.cpp b/ScreenPlayWallpaper/src/linuxwaylandwindow.cpp index 9f05b864..df1fdcb1 100644 --- a/ScreenPlayWallpaper/src/linuxwaylandwindow.cpp +++ b/ScreenPlayWallpaper/src/linuxwaylandwindow.cpp @@ -1,12 +1,11 @@ // SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only #include "linuxwaylandwindow.h" #include - -#include "qwaylandlayersurface.h" -#include "qwaylandlayershellintegration.h" - #include +#include +#include + ScreenPlay::WallpaperExitCode LinuxWaylandWindow::start() { diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt index be485917..3092daaa 100644 --- a/ThirdParty/CMakeLists.txt +++ b/ThirdParty/CMakeLists.txt @@ -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() diff --git a/Tools/setup.py b/Tools/setup.py index 236ca0be..81db9512 100755 --- a/Tools/setup.py +++ b/Tools/setup.py @@ -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}")