2018-06-05 04:03:38 +03:00
|
|
|
add_library(qbt_powermanagement STATIC
|
2015-11-06 21:03:18 +03:00
|
|
|
powermanagement.h
|
|
|
|
powermanagement.cpp
|
|
|
|
)
|
|
|
|
|
2018-06-05 04:03:38 +03:00
|
|
|
target_link_libraries(qbt_powermanagement PUBLIC Qt5::Core)
|
|
|
|
set_target_properties(qbt_powermanagement PROPERTIES AUTOUIC False AUTORCC False)
|
|
|
|
target_include_directories(qbt_powermanagement PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
|
|
|
|
if (UNIX AND Qt5DBus_FOUND)
|
2015-11-06 21:03:18 +03:00
|
|
|
find_package(X11)
|
|
|
|
if (X11_FOUND)
|
2018-06-05 04:03:38 +03:00
|
|
|
target_sources(qbt_powermanagement PRIVATE powermanagement_x11.h powermanagement_x11.cpp)
|
|
|
|
target_link_libraries(qbt_powermanagement PRIVATE Qt5::DBus)
|
2015-11-06 21:03:18 +03:00
|
|
|
endif (X11_FOUND)
|
2018-06-05 04:03:38 +03:00
|
|
|
endif (UNIX AND Qt5DBus_FOUND)
|
2015-11-06 21:03:18 +03:00
|
|
|
|
|
|
|
if (WIN32)
|
2018-06-05 04:03:38 +03:00
|
|
|
target_link_libraries(qbt_powermanagement PRIVATE PowrProf)
|
2015-11-06 21:03:18 +03:00
|
|
|
endif (WIN32)
|