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