From e0074d60784899304c6826f49ef79cdd50356298 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Fri, 29 Sep 2023 11:41:25 +0300 Subject: [PATCH] Move wayland utils to shared utils directory --- src/utils/CMakeLists.txt | 8 ++++++++ src/{wayland => }/utils/executable_path.h | 0 src/{wayland => }/utils/executable_path_proc.cpp | 0 src/{wayland => }/utils/executable_path_sysctl.cpp | 0 src/wayland/CMakeLists.txt | 8 -------- 5 files changed, 8 insertions(+), 8 deletions(-) rename src/{wayland => }/utils/executable_path.h (100%) rename src/{wayland => }/utils/executable_path_proc.cpp (100%) rename src/{wayland => }/utils/executable_path_sysctl.cpp (100%) diff --git a/src/utils/CMakeLists.txt b/src/utils/CMakeLists.txt index bd22820625..0a32598992 100644 --- a/src/utils/CMakeLists.txt +++ b/src/utils/CMakeLists.txt @@ -13,3 +13,11 @@ target_sources(kwin PRIVATE xcbutils.cpp xcursortheme.cpp ) + +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + target_sources(kwin PRIVATE executable_path_proc.cpp) +elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") + target_sources(kwin PRIVATE executable_path_sysctl.cpp) +else() + message(FATAL_ERROR "Unsupported platform ${CMAKE_SYSTEM_NAME}") +endif() diff --git a/src/wayland/utils/executable_path.h b/src/utils/executable_path.h similarity index 100% rename from src/wayland/utils/executable_path.h rename to src/utils/executable_path.h diff --git a/src/wayland/utils/executable_path_proc.cpp b/src/utils/executable_path_proc.cpp similarity index 100% rename from src/wayland/utils/executable_path_proc.cpp rename to src/utils/executable_path_proc.cpp diff --git a/src/wayland/utils/executable_path_sysctl.cpp b/src/utils/executable_path_sysctl.cpp similarity index 100% rename from src/wayland/utils/executable_path_sysctl.cpp rename to src/utils/executable_path_sysctl.cpp diff --git a/src/wayland/CMakeLists.txt b/src/wayland/CMakeLists.txt index 4171b90e28..6936def7a7 100644 --- a/src/wayland/CMakeLists.txt +++ b/src/wayland/CMakeLists.txt @@ -301,14 +301,6 @@ target_sources(kwin PRIVATE xwaylandshell_v1.cpp ) -if(CMAKE_SYSTEM_NAME MATCHES "Linux") - target_sources(kwin PRIVATE utils/executable_path_proc.cpp) -elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD") - target_sources(kwin PRIVATE utils/executable_path_sysctl.cpp) -else() - message(FATAL_ERROR "Unsupported platform ${CMAKE_SYSTEM_NAME}") -endif() - install(FILES appmenu.h blur.h