dde-dock/plugins/onboard/CMakeLists.txt
hillwoodroc 15e022eea9 fix: Link some libraries
There is a warining on deepin after build while a error on the other distributions.
Because of unlink some libs like libxcursor.

Log: Link some libraries
Influence: airplane-mode,bluetooth,onboard,sound,tray
Issue: https://github.com/linuxdeepin/developer-center/issues/2244
Change-Id: I3c293ad99aef22a42539943cb93a6e50809b4b21
Author: Hillwood Yang <hillwood@opensuse.org>
Date: Wed Feb 23 20:12:58 2022 +0800
2022-03-01 09:54:01 +08:00

30 lines
972 B
CMake

set(PLUGIN_NAME "onboard")
project(${PLUGIN_NAME})
# Sources files
file(GLOB_RECURSE SRCS "*.h" "*.cpp" "../../widgets/*.h" "../../widgets/*.cpp")
find_package(PkgConfig REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(DtkGui REQUIRED)
find_package(DtkWidget REQUIRED)
add_definitions("${QT_DEFINITIONS} -DQT_PLUGIN")
add_library(${PLUGIN_NAME} SHARED ${SRCS} onboard.qrc)
set_target_properties(${PLUGIN_NAME} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ../)
target_include_directories(${PLUGIN_NAME} PUBLIC ${Qt5DBus_INCLUDE_DIRS}
${DFrameworkDBus_INCLUDE_DIRS}
../../interfaces)
target_link_libraries(${PLUGIN_NAME} PRIVATE
${Qt5Widgets_LIBRARIES}
${Qt5DBus_LIBRARIES}
${DtkGui_LIBRARIES}
${DtkWidget_LIBRARIES}
${DFrameworkDBus_LIBRARIES}
)
install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)