2022-02-20 17:55:26 +01:00
|
|
|
project(
|
|
|
|
ScreenPlaySysInfo
|
|
|
|
VERSION 0.1
|
|
|
|
LANGUAGES CXX)
|
2020-04-30 20:03:14 +02:00
|
|
|
|
2021-01-28 15:19:46 +01:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2022-02-20 17:55:26 +01:00
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED 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
|
|
|
|
2022-04-30 13:22:17 +02:00
|
|
|
set(QML qml/TestMain.qml)
|
2022-02-20 17:55:26 +01:00
|
|
|
|
2022-03-12 14:36:03 +01:00
|
|
|
set(QML_PLUGIN_SOURCES
|
|
|
|
src/cpu.cpp
|
|
|
|
src/gpu.cpp
|
|
|
|
src/ipaddress.cpp
|
|
|
|
src/ram.cpp
|
|
|
|
src/storage.cpp
|
|
|
|
src/sysinfo.cpp
|
|
|
|
src/uptime.cpp)
|
2022-02-20 17:55:26 +01:00
|
|
|
|
|
|
|
set(QML_PLUGIN_HEADER
|
|
|
|
src/cpu.h
|
2022-03-12 14:36:03 +01:00
|
|
|
src/gpu.h
|
|
|
|
src/ipaddress.h
|
2022-02-20 17:55:26 +01:00
|
|
|
src/mathhelper.h
|
2022-03-12 14:36:03 +01:00
|
|
|
src/ram.h
|
2022-02-20 17:55:26 +01:00
|
|
|
src/storage.h
|
2022-03-12 14:36:03 +01:00
|
|
|
src/sysinfo.h
|
|
|
|
src/uptime.h)
|
2022-02-20 17:55:26 +01:00
|
|
|
|
2022-04-04 18:06:43 +02:00
|
|
|
qt_add_library(${PROJECT_NAME} STATIC)
|
2022-02-20 17:55:26 +01:00
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE Qt6::Core Qt6::Quick infoware)
|
|
|
|
target_include_directories(${PROJECT_NAME} PUBLIC src/)
|
2020-03-10 12:34:34 +01:00
|
|
|
|
2022-04-04 18:06:43 +02:00
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(${PROJECT_NAME} PRIVATE ole32.lib winmm.lib)
|
|
|
|
endif()
|
2020-04-30 20:03:14 +02:00
|
|
|
|
2021-12-31 13:32:37 +01:00
|
|
|
qt_add_qml_module(
|
|
|
|
${PROJECT_NAME}
|
|
|
|
URI
|
|
|
|
${PROJECT_NAME}
|
|
|
|
VERSION
|
2022-02-20 17:55:26 +01:00
|
|
|
1.0
|
|
|
|
OUTPUT_DIRECTORY
|
2022-04-30 13:22:17 +02:00
|
|
|
${SCREENPLAY_QML_MODULES_PATH}/${PROJECT_NAME}
|
|
|
|
RESOURCE_PREFIX /qml
|
2022-02-20 17:55:26 +01:00
|
|
|
QML_FILES
|
|
|
|
${QML}
|
|
|
|
SOURCES
|
|
|
|
${QML_PLUGIN_SOURCES}
|
|
|
|
${QML_PLUGIN_HEADER})
|
|
|
|
|
2022-04-04 18:06:43 +02:00
|
|
|
if(${SCREENPLAY_TESTS})
|
2022-02-20 17:55:26 +01:00
|
|
|
qt_add_executable(tst_ScreenPlaySysInfo src/TestMain.cpp)
|
|
|
|
target_link_libraries(tst_ScreenPlaySysInfo PRIVATE Qt6::Quick ${PROJECT_NAME}plugin)
|
|
|
|
target_compile_definitions(tst_ScreenPlaySysInfo PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
|
|
|
|
endif()
|