mirror of
https://github.com/hyprwm/hyprsysteminfo.git
synced 2025-05-12 21:20:40 +01:00

Qt appears to have no way to retrieve the pixel size sent by wayland, as it overrides it with the logical size and will not return the physical one.
34 lines
873 B
CMake
34 lines
873 B
CMake
cmake_minimum_required(VERSION 3.16)
|
|
|
|
# Get version
|
|
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
|
|
string(STRIP ${VER_RAW} VER)
|
|
|
|
project(hsi VERSION ${VER} LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 23)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
find_package(Qt6 6.5 REQUIRED COMPONENTS Widgets Quick QuickControls2 WaylandClient)
|
|
find_package(PkgConfig REQUIRED)
|
|
|
|
pkg_check_modules(hyprutils REQUIRED IMPORTED_TARGET hyprutils)
|
|
|
|
qt_standard_project_setup(REQUIRES 6.5)
|
|
|
|
add_subdirectory(src)
|
|
|
|
qt_add_resources(hyprsysteminfo "resource"
|
|
PREFIX "/"
|
|
FILES
|
|
resource/hyprlandlogo.svg
|
|
)
|
|
|
|
include(GNUInstallDirs)
|
|
install(TARGETS hyprsysteminfo
|
|
BUNDLE DESTINATION .
|
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
)
|
|
|
|
install(FILES assets/install/hyprsysteminfo.desktop DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
|