From 1d96b41bb4048f35daf256249ec2b19f55b93afd Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 9 Nov 2021 19:31:50 +0200 Subject: [PATCH] build: Move software vsync helpers to libkwin Compile software vsync helpers into libkwin for the consistency sake with other helpers. --- src/backends/drm/CMakeLists.txt | 2 +- src/backends/fbdev/CMakeLists.txt | 2 +- src/backends/virtual/CMakeLists.txt | 2 +- src/backends/x11/standalone/CMakeLists.txt | 2 +- src/backends/x11/windowed/CMakeLists.txt | 2 +- src/platformsupport/vsyncconvenience/CMakeLists.txt | 6 ++---- 6 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/backends/drm/CMakeLists.txt b/src/backends/drm/CMakeLists.txt index d97b4c4371..cd9d0f5a07 100644 --- a/src/backends/drm/CMakeLists.txt +++ b/src/backends/drm/CMakeLists.txt @@ -38,7 +38,7 @@ endif() add_library(KWinWaylandDrmBackend MODULE ${DRM_SOURCES}) set_target_properties(KWinWaylandDrmBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") -target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm VsyncSupport) +target_link_libraries(KWinWaylandDrmBackend kwin Libdrm::Libdrm) if (HAVE_GBM) target_link_libraries(KWinWaylandDrmBackend gbm::gbm) diff --git a/src/backends/fbdev/CMakeLists.txt b/src/backends/fbdev/CMakeLists.txt index 5d1b7dcccd..1cd883cd35 100644 --- a/src/backends/fbdev/CMakeLists.txt +++ b/src/backends/fbdev/CMakeLists.txt @@ -6,7 +6,7 @@ set(FBDEV_SOURCES add_library(KWinWaylandFbdevBackend MODULE ${FBDEV_SOURCES}) set_target_properties(KWinWaylandFbdevBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") -target_link_libraries(KWinWaylandFbdevBackend kwin VsyncSupport) +target_link_libraries(KWinWaylandFbdevBackend kwin) install( TARGETS diff --git a/src/backends/virtual/CMakeLists.txt b/src/backends/virtual/CMakeLists.txt index f2787c4540..eb959b9e10 100644 --- a/src/backends/virtual/CMakeLists.txt +++ b/src/backends/virtual/CMakeLists.txt @@ -10,7 +10,7 @@ ecm_qt_declare_logging_category(VIRTUAL_SOURCES HEADER logging.h IDENTIFIER KWIN add_library(KWinWaylandVirtualBackend MODULE ${VIRTUAL_SOURCES}) set_target_properties(KWinWaylandVirtualBackend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") -target_link_libraries(KWinWaylandVirtualBackend kwin VsyncSupport) +target_link_libraries(KWinWaylandVirtualBackend kwin) install( TARGETS diff --git a/src/backends/x11/standalone/CMakeLists.txt b/src/backends/x11/standalone/CMakeLists.txt index 9f21a14471..acb6612d1b 100644 --- a/src/backends/x11/standalone/CMakeLists.txt +++ b/src/backends/x11/standalone/CMakeLists.txt @@ -17,7 +17,7 @@ set(X11PLATFORM_SOURCES add_library(KWinX11Platform MODULE ${X11PLATFORM_SOURCES}) set_target_properties(KWinX11Platform PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.platforms/") -target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils VsyncSupport Qt::X11Extras KF5::Crash X11::X11) +target_link_libraries(KWinX11Platform eglx11common kwin kwinxrenderutils Qt::X11Extras KF5::Crash X11::X11) if (X11_Xi_FOUND) target_sources(KWinX11Platform PRIVATE xinputintegration.cpp) target_link_libraries(KWinX11Platform X11::Xi) diff --git a/src/backends/x11/windowed/CMakeLists.txt b/src/backends/x11/windowed/CMakeLists.txt index 26d83d7348..641890a0e1 100644 --- a/src/backends/x11/windowed/CMakeLists.txt +++ b/src/backends/x11/windowed/CMakeLists.txt @@ -8,7 +8,7 @@ set(X11BACKEND_SOURCES add_library(KWinWaylandX11Backend MODULE ${X11BACKEND_SOURCES}) set_target_properties(KWinWaylandX11Backend PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/org.kde.kwin.waylandbackends/") -target_link_libraries(KWinWaylandX11Backend eglx11common kwin kwinxrenderutils X11::XCB VsyncSupport X11::X11) +target_link_libraries(KWinWaylandX11Backend eglx11common kwin kwinxrenderutils X11::XCB X11::X11) if (X11_Xi_FOUND) target_link_libraries(KWinWaylandX11Backend X11::Xi) endif() diff --git a/src/platformsupport/vsyncconvenience/CMakeLists.txt b/src/platformsupport/vsyncconvenience/CMakeLists.txt index 2bb774920c..2d316ee7cc 100644 --- a/src/platformsupport/vsyncconvenience/CMakeLists.txt +++ b/src/platformsupport/vsyncconvenience/CMakeLists.txt @@ -1,8 +1,6 @@ -set(vsyncconvenience_SOURCES +target_sources(kwin PRIVATE softwarevsyncmonitor.cpp vsyncmonitor.cpp ) -add_library(VsyncSupport OBJECT ${vsyncconvenience_SOURCES}) -target_link_libraries(VsyncSupport Qt::Core Qt::Gui) -target_include_directories(VsyncSupport PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) +target_include_directories(kwin PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})