mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-03 06:02:29 -06:00
CMake: Don't split GUI code into several libraries
This commit is contained in:
@@ -1,23 +1,8 @@
|
||||
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})
|
||||
target_sources(qbt_gui PRIVATE powermanagement.h powermanagement.cpp)
|
||||
|
||||
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)
|
||||
target_sources(qbt_gui PRIVATE powermanagement_x11.h powermanagement_x11.cpp)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user