diff --git a/.gitignore b/.gitignore index 281ac916..429aa9c1 100644 --- a/.gitignore +++ b/.gitignore @@ -261,3 +261,4 @@ cython_debug/ /ThirdParty/qml-archive/** /ThirdParty/qml-plausible/ /ThirdParty/ffmpeg/** +/ThirdParty/qt-layer-shell/** diff --git a/CMakeLists.txt b/CMakeLists.txt index afcad827..ff38f87c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,12 +109,6 @@ add_compile_definitions(BUILD_DATE="${BUILD_DATE}") add_compile_definitions(GIT_BRANCH_NAME="${GIT_BRANCH_NAME}") add_compile_definitions(GIT_COMMIT_HASH="${GIT_COMMIT_HASH}") -if(UNIX AND NOT APPLE) - # Fixes QWebEngine linker errors on Ubuntu 20.04 - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fuse-ld=gold") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fuse-ld=gold") -endif() - add_subdirectory(ThirdParty) set(ECM_DIR "${THIRD_PARTY_PATH}/ecm") add_subdirectory(CMake) diff --git a/CMakePresets.json b/CMakePresets.json index 31230776..9c69b60e 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -74,7 +74,7 @@ } }, { - "name": "linux-debug", + "name": "linux-generic-debug", "displayName": "ScreenPlay 64bit Debug Linux", "description": "Linux only!", "generator": "Ninja", @@ -84,6 +84,40 @@ "lhs": "${hostSystemName}", "rhs": "Linux" }, + "architecture": { + "value": "x64", + "strategy": "external" + }, + "cacheVariables": { + "CMAKE_CXX_COMPILER": "g++", + "CMAKE_C_COMPILER": "gcc", + "CMAKE_BUILD_TYPE": "Debug", + "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake", + "VCPKG_TARGET_TRIPLET": "x64-linux", + "SCREENPLAY_STEAM": "OFF", + "SCREENPLAY_TESTS": "OFF" + } + }, + { + "name": "linux-relwithdebinfo", + "displayName": "ScreenPlay 64bit RelWithDebInfo Linux", + "inherits": "linux-generic-debug", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.2_GCC_RelWithDebInfo", + "cacheVariables": { + "CMAKE_BUILD_TYPE": "RelWithDebInfo" + } + }, + { + "name": "linux-aqt-debug", + "displayName": "ScreenPlay 64bit Debug Linux using aqt", + "description": "Linux only!", + "generator": "Ninja", + "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.2_GCC_Debug", + "condition": { + "type": "equals", + "lhs": "${hostSystemName}", + "rhs": "Linux" + }, "environment": { "qt_path": "${sourceDir}/../aqt" }, @@ -101,9 +135,9 @@ } }, { - "name": "linux-relwithdebinfo", - "displayName": "ScreenPlay 64bit RelWithDebInfo Linux", - "inherits": "linux-debug", + "name": "linux-aqt-relwithdebinfo", + "displayName": "ScreenPlay 64bit RelWithDebInfo Linux using aqt", + "inherits": "linux-ubuntu-debug", "binaryDir": "${sourceDir}/../build_ScreenPlay_Qt_6.5.2_GCC_RelWithDebInfo", "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo" diff --git a/ScreenPlayWallpaper/CMakeLists.txt b/ScreenPlayWallpaper/CMakeLists.txt index 829bd2a9..620afbae 100644 --- a/ScreenPlayWallpaper/CMakeLists.txt +++ b/ScreenPlayWallpaper/CMakeLists.txt @@ -87,11 +87,11 @@ endif() if(UNIX AND NOT APPLE) find_package(ECM CONFIG REQUIRED NO_MODULE) - set(LayerShellQt "/usr/local/lib/x86_64-linux-gnu/cmake/LayerShellQt/") + set(LayerShellQt "${CMAKE_CURRENT_SOURCE_DIR}/../ThirdParty/layer-shell-qt/") find_package(LayerShellQt REQUIRED) target_link_libraries( ${PROJECT_NAME} - PRIVATE /usr/local/lib/x86_64-linux-gnu/libLayerShellQtInterface.so) + PRIVATE LayerShellQtInterface) include(CopyRecursive) copy_recursive(${CMAKE_CURRENT_SOURCE_DIR}/kde/ScreenPlay ${CMAKE_BINARY_DIR}/bin/kde/ScreenPlay "*") diff --git a/ScreenPlayWallpaper/qml/Wallpaper.qml b/ScreenPlayWallpaper/qml/Wallpaper.qml index 62b727f7..25063a36 100644 --- a/ScreenPlayWallpaper/qml/Wallpaper.qml +++ b/ScreenPlayWallpaper/qml/Wallpaper.qml @@ -27,7 +27,7 @@ Rectangle { loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaView.qml"; } } - if (Qt.platform.os === "windows") { + if (Qt.platform.os === "windows" || Qt.platform.os === "linux") { loader.source = "qrc:/qml/ScreenPlayWallpaper/qml/MultimediaView.qml"; } break; diff --git a/ThirdParty/CMakeLists.txt b/ThirdParty/CMakeLists.txt index 64c1f619..01ad0a83 100644 --- a/ThirdParty/CMakeLists.txt +++ b/ThirdParty/CMakeLists.txt @@ -8,13 +8,27 @@ FetchContent_Populate( # https://bugreports.qt.io/browse/QTCREATORBUG-27083 SOURCE_DIR ${THIRD_PARTY_PATH}/QArchive) - FetchContent_Populate( - qml-plausible - GIT_REPOSITORY https://gitlab.com/kelteseth/qml-plausible.git - GIT_TAG 5069ba3bf25663ea06be8b94c398d6c61058d4d5 - # Workaround because: 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder - # https://bugreports.qt.io/browse/QTCREATORBUG-27083 - SOURCE_DIR ${THIRD_PARTY_PATH}/qml-plausible) +FetchContent_Populate( + qml-plausible + GIT_REPOSITORY https://gitlab.com/kelteseth/qml-plausible.git + GIT_TAG 5069ba3bf25663ea06be8b94c398d6c61058d4d5 + # Workaround because: 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder + # https://bugreports.qt.io/browse/QTCREATORBUG-27083 + SOURCE_DIR ${THIRD_PARTY_PATH}/qml-plausible) + + add_subdirectory(qml-plausible) -add_subdirectory(QArchive) \ No newline at end of file +add_subdirectory(QArchive) + +if(UNIX AND NOT APPLE) +FetchContent_Populate( + qt-layer-shell + GIT_REPOSITORY https://github.com/KDE/layer-shell-qt.git + GIT_TAG 721c0ae334554eb2396a2d4d3358f896b8c77412 + # Workaround because: 1. QtCreator cannot handle QML_ELEMENT stuff when it is in bin folder + # https://bugreports.qt.io/browse/QTCREATORBUG-27083 + SOURCE_DIR ${THIRD_PARTY_PATH}/qt-layer-shell) + add_subdirectory(qt-layer-shell) + +endif() \ No newline at end of file