Changeset View
Changeset View
Standalone View
Standalone View
sensors/CMakeLists.txt
- This file was added.
1 | set(KSYSGUARD_SENSORS_SOVERSION 1) | ||||
---|---|---|---|---|---|
2 | | ||||
3 | add_subdirectory(declarative) | ||||
4 | | ||||
5 | add_definitions(-DTRANSLATION_DOMAIN=\"ksysguard_sensors\") | ||||
6 | | ||||
7 | set(sensors_LIB_SRCS | ||||
8 | Sensor.cpp | ||||
9 | SensorDataModel.cpp | ||||
10 | SensorTreeModel.cpp | ||||
11 | SensorQuery.cpp | ||||
12 | SensorDaemonInterface.cpp | ||||
13 | ) | ||||
14 | | ||||
15 | set(sensors_LIB_HEADERS | ||||
16 | Sensor.h | ||||
17 | SensorDataModel.h | ||||
18 | SensorTreeModel.h | ||||
19 | SensorQuery.h | ||||
20 | SensorInfo_p.h | ||||
21 | ) | ||||
22 | | ||||
23 | ecm_qt_declare_logging_category(sensors_LIB_SRCS | ||||
24 | HEADER sensors_logging.h | ||||
25 | IDENTIFIER LIBKSYSGUARD_SENSORS | ||||
26 | CATEGORY_NAME org.kde.libksysguard.sensors | ||||
27 | ) | ||||
28 | | ||||
29 | set_source_files_properties(org.kde.KSysGuardDaemon.xml PROPERTIES INCLUDE SensorInfo_p.h) | ||||
30 | qt5_add_dbus_interface(sensors_LIB_SRCS org.kde.KSysGuardDaemon.xml ksysguarddaemon) | ||||
31 | | ||||
32 | add_library(Sensors ${sensors_LIB_SRCS}) | ||||
33 | add_library(KSysGuard::Sensors ALIAS Sensors) | ||||
34 | | ||||
35 | target_include_directories(Sensors | ||||
36 | PUBLIC | ||||
37 | "$<BUILD_INTERFACE:${libksysguard_SOURCE_DIR}>" | ||||
38 | "$<INSTALL_INTERFACE:${KDE_INSTALL_INCLUDEDIR}/ksysguard/>" | ||||
39 | ) | ||||
40 | | ||||
41 | generate_export_header(Sensors) | ||||
42 | | ||||
43 | target_link_libraries(Sensors | ||||
44 | PUBLIC | ||||
45 | Qt5::Qml | ||||
46 | KSysGuard::Formatter | ||||
47 | PRIVATE | ||||
48 | Qt5::Core | ||||
49 | Qt5::DBus | ||||
50 | KF5::I18n | ||||
51 | ) | ||||
52 | | ||||
53 | set_target_properties(Sensors PROPERTIES | ||||
54 | LIBRARY_OUTPUT_NAME KSysGuardSensors | ||||
55 | VERSION ${KSYSGUARD_VERSION_STRING} | ||||
56 | SOVERSION ${KSYSGUARD_SENSORS_SOVERSION} | ||||
57 | ) | ||||
58 | | ||||
59 | install(TARGETS Sensors EXPORT libksysguardLibraryTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) | ||||
60 | install(FILES | ||||
61 | ${sensors_LIB_HEADERS} | ||||
62 | ${CMAKE_CURRENT_BINARY_DIR}/sensors_export.h | ||||
63 | DESTINATION ${KDE_INSTALL_INCLUDEDIR}/ksysguard/sensors | ||||
64 | COMPONENT Devel | ||||
65 | ) |