mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-01-08 08:07:23 +03:00
23 lines
706 B
CMake
23 lines
706 B
CMake
add_library(qbt_powermanagement STATIC
|
|
# headers
|
|
powermanagement.h
|
|
|
|
# sources
|
|
powermanagement.cpp
|
|
)
|
|
|
|
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)
|
|
find_package(X11)
|
|
if (X11_FOUND)
|
|
target_sources(qbt_powermanagement PRIVATE powermanagement_x11.h powermanagement_x11.cpp)
|
|
target_link_libraries(qbt_powermanagement PRIVATE Qt5::DBus)
|
|
endif (X11_FOUND)
|
|
endif (UNIX AND Qt5DBus_FOUND)
|
|
|
|
if (WIN32)
|
|
target_link_libraries(qbt_powermanagement PRIVATE PowrProf)
|
|
endif (WIN32)
|