nixpkgs/pkgs/by-name/ws/wsysmon/fix-deps-and-add-install.patch

44 lines
2.2 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 31e8048..b21f6f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,12 +5,7 @@ set(CMAKE_CXX_STANDARD 17)
find_package(PkgConfig)
include(FetchContent)
-FetchContent_Declare(
- spdlog
- GIT_REPOSITORY https://github.com/gabime/spdlog.git
- GIT_TAG v1.10.0
-)
-FetchContent_MakeAvailable(spdlog)
+find_package(spdlog REQUIRED)
pkg_check_modules(GTKMM REQUIRED gtkmm-3.0)
find_package(X11 REQUIRED)
@@ -19,4 +14,10 @@ link_directories(${GTKMM_LIBRARY_DIRS})
include_directories(${GTKMM_INCLUDE_DIRS} ${X11_INCLUDE_DIR})
add_executable(WSysMon src/main.cpp src/ui/MainWindow.cpp src/ui/widgets/GraphWidget.cpp src/ui/widgets/PerformanceButton.cpp src/ui/views/ProcessesView.cpp src/ui/views/PerformanceView.cpp src/ui/views/performance/PerformanceCPUView.cpp src/ui/views/performance/PerformanceGPUView.cpp src/ui/views/performance/PerformanceNetworkView.cpp src/ui/views/performance/PerformanceRAMView.cpp src/utils/DispatcherThread.cpp src/utils/UnitConverter.cpp src/utils/X11Utils.cpp src/api/process/ProcessManager.cpp src/api/process/ProcessNode.cpp src/api/linux/ProcessesApi.cpp src/api/linux/GPUApi.cpp src/api/linux/NetworkApi.cpp src/api/linux/SystemInfoApi.cpp src/api/DiskApi.h src/api/linux/DiskApi.cpp src/ui/views/performance/PerformanceDiskView.cpp src/ui/views/performance/PerformanceDiskView.h src/api/linux/gpu/nvml.h src/api/linux/gpu/nvml_hook_funcs.inl src/api/linux/gpu/NvGpuApi.cpp src/api/linux/gpu/NvGpuApi.h src/api/HwMonApi.h src/api/linux/HwMonApi.cpp)
-target_link_libraries(WSysMon PRIVATE spdlog::spdlog pthread procps ${CMAKE_DL_LIBS} ${GTKMM_LIBRARIES} ${X11_LIBRARIES})
+target_link_libraries(WSysMon PRIVATE spdlog::spdlog pthread ${CMAKE_DL_LIBS} ${GTKMM_LIBRARIES} ${X11_LIBRARIES})
+
+install(
+ TARGETS
+ WSysMon
+ RUNTIME DESTINATION bin
+)
diff --git a/src/api/process/ProcessManager.h b/src/api/process/ProcessManager.h
index 44989f4..2e98963 100644
--- a/src/api/process/ProcessManager.h
+++ b/src/api/process/ProcessManager.h
@@ -5,8 +5,6 @@
#include <map>
#include <vector>
-#include <proc/readproc.h>
-
#include "ProcessNode.h"
#include "../ProcessesApi.h"