CMakeLists.txt 892 Bytes
Newer Older
1
find_package(KDE4 REQUIRED)
2 3 4 5
find_package(QJSON REQUIRED)
find_package(QCA2 REQUIRED)

include(KDE4Defaults)
6
include_directories(${KDE4_INCLUDES})
7

8 9 10 11
set(kdeconnect_battery_SRCS
    batteryplugin.cpp
    batterydbusinterface.cpp
    ../kdeconnectplugin.cpp
12 13 14
    ../pluginloader.cpp
    ../../networkpackage.cpp
    ../../device.cpp
15 16
)

17 18 19 20 21 22
kde4_add_plugin(kdeconnect_battery ${kdeconnect_battery_SRCS})

target_link_libraries(kdeconnect_battery
    ${KDE4_KDECORE_LIBS}
    ${KDE4_KDEUI_LIBS}
    ${QT_QTNETWORK_LIBRARY}
23 24
    ${QJSON_LIBRARIES}
    ${QCA2_LIBRARIES}
25 26 27 28 29 30 31
)

install(TARGETS kdeconnect_battery DESTINATION ${PLUGIN_INSTALL_DIR} )
install(FILES kdeconnect_battery.desktop DESTINATION ${SERVICES_INSTALL_DIR} )

include(../../../cmakemacros.txt)

32
generate_and_install_dbus_interface(
33 34 35
    kdeconnect_battery
    batterydbusinterface.h
    org.kde.kdeconnect.device.battery.xml
36 37
    OPTIONS -a
)