From b66e293b5575e0175aaa311e656a8c61ed6814ca Mon Sep 17 00:00:00 2001 From: Elias Steurer Date: Thu, 9 Nov 2023 12:10:52 +0100 Subject: [PATCH] Fix linux compilation --- ScreenPlay/CMakeLists.txt | 3 +-- ScreenPlay/src/monitorlistmodel.cpp | 2 ++ ScreenPlay/src/settings.cpp | 2 +- ScreenPlayWallpaper/CMakeLists.txt | 4 +--- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index dcb89f90..a8d04317 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -295,7 +295,6 @@ target_link_libraries( ScreenPlayApp PUBLIC ScreenPlaySDK LibArchive::LibArchive - ScreenPlayWallpaperLib ScreenPlayUtil ScreenPlayUtilplugin QArchive @@ -354,7 +353,7 @@ if(WIN32 endif() if(WIN32) - target_link_libraries(ScreenPlayApp PUBLIC CURL::libcurl sentry::sentry) + target_link_libraries(ScreenPlayApp PUBLIC CURL::libcurl sentry::sentry ScreenPlayWallpaperLib) # Icon target_sources(${PROJECT_NAME} PRIVATE ScreenPlay.rc) diff --git a/ScreenPlay/src/monitorlistmodel.cpp b/ScreenPlay/src/monitorlistmodel.cpp index 91ab7699..a5d2e954 100644 --- a/ScreenPlay/src/monitorlistmodel.cpp +++ b/ScreenPlay/src/monitorlistmodel.cpp @@ -1,7 +1,9 @@ // SPDX-License-Identifier: LicenseRef-EliasSteurerTachiom OR AGPL-3.0-only #include "ScreenPlay/monitorlistmodel.h" +#ifdef Q_OS_WIN #include "windowsintegration.h" +#endif #include namespace ScreenPlay { diff --git a/ScreenPlay/src/settings.cpp b/ScreenPlay/src/settings.cpp index d6519b62..6de20258 100644 --- a/ScreenPlay/src/settings.cpp +++ b/ScreenPlay/src/settings.cpp @@ -177,7 +177,7 @@ void Settings::setupWidgetAndWindowPaths() m_globalVariables->setGodotWallpaperExecutablePath(QUrl(workingDir.path() + basePath + "ScreenPlayWallpaperGodot").toLocalFile()); const auto godotEditorName = "Godot_" + godotVersion + "-stable_osx.universal"; m_globalVariables->setGodotEditorExecutablePath(QUrl(workingDir.path() + "/" + godotEditorName)); - } else if (osType == "linux") { + } else if (osType == "linux" || osType == "ubuntu") { m_globalVariables->setWidgetExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWidget")); m_globalVariables->setWallpaperExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWallpaper")); m_globalVariables->setGodotWallpaperExecutablePath(QUrl(workingDir.path() + "/ScreenPlayWallpaperGodot")); diff --git a/ScreenPlayWallpaper/CMakeLists.txt b/ScreenPlayWallpaper/CMakeLists.txt index 38d68d06..23803821 100644 --- a/ScreenPlayWallpaper/CMakeLists.txt +++ b/ScreenPlayWallpaper/CMakeLists.txt @@ -63,9 +63,7 @@ endif() add_executable( ${PROJECT_NAME} ${SOURCES} - ${HEADER} - src/windowsintegration.h - src/windowsintegration.cpp) + ${HEADER}) qt_add_qml_module( ${PROJECT_NAME}