2020-10-29 18:53:52 +01:00
|
|
|
project(ScreenPlaySysInfo LANGUAGES CXX)
|
2020-04-30 20:03:14 +02:00
|
|
|
|
2021-01-28 15:19:46 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2020-04-30 20:03:14 +02:00
|
|
|
set(CMAKE_AUTORCC ON)
|
2020-03-10 12:16:58 +01:00
|
|
|
set(CMAKE_AUTOMOC ON)
|
2020-04-30 20:03:14 +02:00
|
|
|
|
2021-05-12 17:09:24 +02:00
|
|
|
find_package(infoware CONFIG REQUIRED)
|
2021-06-20 18:50:54 +02:00
|
|
|
|
|
|
|
find_package(
|
2021-09-10 11:09:38 +02:00
|
|
|
Qt6
|
2020-10-29 18:53:52 +01:00
|
|
|
COMPONENTS Quick Core
|
|
|
|
REQUIRED)
|
2020-04-30 20:03:14 +02:00
|
|
|
|
2021-10-15 15:06:05 +02:00
|
|
|
set(SOURCES
|
|
|
|
# cmake-format: sortable
|
2021-02-13 20:14:10 +01:00
|
|
|
screenplaysysinfo_plugin.cpp
|
|
|
|
sysinfo.cpp
|
|
|
|
cpu.cpp
|
|
|
|
ram.cpp
|
|
|
|
storage.cpp
|
2021-05-12 17:09:24 +02:00
|
|
|
uptime.cpp
|
|
|
|
gpu.cpp)
|
2021-02-13 20:14:10 +01:00
|
|
|
|
2021-10-15 15:06:05 +02:00
|
|
|
set(HEADER
|
|
|
|
# cmake-format: sortable
|
2021-02-13 20:14:10 +01:00
|
|
|
screenplaysysinfo_plugin.h
|
|
|
|
sysinfo.h
|
|
|
|
cpu.h
|
|
|
|
ram.h
|
|
|
|
mathhelper.h
|
|
|
|
storage.h
|
2021-05-12 17:09:24 +02:00
|
|
|
uptime.h
|
|
|
|
gpu.h)
|
2020-03-10 12:34:34 +01:00
|
|
|
|
2021-10-15 15:06:05 +02:00
|
|
|
add_library(${PROJECT_NAME} SHARED ${SOURCES} ${HEADER})
|
2020-04-30 20:03:14 +02:00
|
|
|
|
2021-10-15 15:06:05 +02:00
|
|
|
qt_add_qml_module(${PROJECT_NAME} URI ${PROJECT_NAME} VERSION 1.0)
|
2020-05-01 17:44:21 +02:00
|
|
|
|
2021-10-15 15:06:05 +02:00
|
|
|
target_compile_definitions(${PROJECT_NAME} PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
2021-06-25 16:28:30 +02:00
|
|
|
|
2021-09-10 11:09:38 +02:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Quick infoware)
|