Skip to content

Commit

Permalink
fix(merge-to-v23): 0873866
Browse files Browse the repository at this point in the history
  • Loading branch information
18202781743 committed May 23, 2023
1 parent 04b7de0 commit 5be9677
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
6 changes: 2 additions & 4 deletions dcc-network-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ add_library(${PLUGIN_NAME} SHARED ${SRCS})
# 变量 ${DtkWidget_INCLUDE_DIRS} 是在前面执行 find_package 命令时引入的
# 当出现编译失败提示找不到某些库的头文件时应该检查此处是否将所有需要的头文件都包含了
target_include_directories(${PLUGIN_NAME} PUBLIC
../src
../src/realize
window
operation
${Qt5Widgets_INCLUDE_DIRS}
Expand All @@ -66,7 +64,7 @@ target_include_directories(${PLUGIN_NAME} PUBLIC
${KF5_QT_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${NETINTERFACEINCLUDE}
# ${DDE-Network-Core_INCLUDE_DIRS}
${DDE-Network-Core_INCLUDE_DIRS}
)
# 设置目标要使用的链接库
# 变量 ${DtkWidget_LIBRARIES} 和 ${Qt5Widgets_LIBRARIES} 是在前面执行 find_package 命令时引入的
Expand All @@ -80,7 +78,7 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE
${Qt5Network_LIBRARIES}
${DCC_WIDGETS_LIBRARIES}
${DCC_INTERFACE_LIBRARIES}
# ${DDE-Network-Core_LIBRARIES}
${DDE-Network-Core_LIBRARIES}
)

# 设置执行 make install 时哪个目标应该被 install 到哪个位置
Expand Down
1 change: 0 additions & 1 deletion dock-network-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ if (NOT KF5_QT_LIBRARIES)
endif()

target_include_directories(${PLUGIN_NAME} PUBLIC
${NETWORKINTERFACE}
${DtkWidget_INCLUDE_DIRS}
${Qt5DBus_INCLUDE_DIRS}
${QGSettings_INCLUDE_DIRS}
Expand Down
1 change: 0 additions & 1 deletion dss-network-plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ if (NOT KF5_QT_LIBRARIES)
endif()

target_include_directories(${PLUGIN_NAME} PUBLIC
${NETWORKINTERFACE}
${DtkWidget_INCLUDE_DIRS}
${Qt5DBus_INCLUDE_DIRS}
${QGSettings_INCLUDE_DIRS}
Expand Down
13 changes: 5 additions & 8 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ aux_source_directory(../dcc-network-plugin/sections/vpn DCCPLUGINSECTIONSVPN)
aux_source_directory(../dcc-network-plugin/settings DCCPLUGINSETTINGS)
aux_source_directory(../dcc-network-plugin/settings/vpn DCCPLUGINVPNSETTINGS)
aux_source_directory(../dcc-network-plugin/themes DCCPLUGINTHEMES)
aux_source_directory(../src NETWORKDIR)
aux_source_directory(../src/realize REALIZEDIR)

file(GLOB_RECURSE QRCFILE "./example.qrc"
"../dcc-network-plugin/icons/dcc-network-plugin.qrc"
Expand All @@ -38,8 +36,6 @@ file(GLOB_RECURSE DCCPLUGINSRCS
"../dcc-network-plugin/*.h"
"../dcc-network-plugin/*.cpp"
"../dcc-network-plugin/icons/*"
"../dcc-network-plugin/../src/*.h"
"../dcc-network-plugin/../src/*.cpp"
)
#message(${DCCPLUGINDIR})

Expand Down Expand Up @@ -74,8 +70,6 @@ IMPORTED_LOCATION_NOCONFIG
)

target_include_directories(${PROJECT_NAME} PUBLIC
../src
../src/realize
../dcc-network-plugin
../dcc-network-plugin/window
../dcc-network-plugin/operation
Expand All @@ -89,7 +83,8 @@ target_include_directories(${PROJECT_NAME} PUBLIC
#${LibNM_INCLUDE_DIRS}
${Qt5Network_INCLUDE_DIRS}
${KF5_QT_INCLUDE_DIRS}
${NETINTERFACEINCLUDE})
${DDE-Network-Core_INCLUDE_DIRS}
)

target_link_libraries(${PROJECT_NAME} PRIVATE
${DdeControlCenter_LIBRARIES}
Expand All @@ -103,7 +98,9 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
${Qt5DBus_LIBRARIES}
${Qt5Network_LIBRARIES}
${QGSettings_LIBRARIES}
${KF5_QT_LIBRARIES})
${KF5_QT_LIBRARIES}
${DDE-Network-Core_LIBRARIES}
)

add_custom_command(
OUTPUT path.pb.cc path.pb.h
Expand Down
8 changes: 4 additions & 4 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ IMPORTED_LOCATION_NOCONFIG
)

aux_source_directory(. FILES)
aux_source_directory(../src NETWORKDIR)
aux_source_directory(../src/realize REALIZEDIR)

add_executable(${PROJECT_NAME} ${FILES} ${NETWORKDIR} ${REALIZEDIR})
add_executable(${PROJECT_NAME} ${FILES})

target_include_directories(${PROJECT_NAME} PUBLIC
${QGSettings_INCLUDE_DIRS}
Expand All @@ -71,4 +69,6 @@ target_link_libraries(${PROJECT_NAME} PRIVATE
${QGSettings_LIBRARIES}
${KF5_QT_LIBRARIES}
-lpthread
-lm)
-lm
dde-network-core
)

0 comments on commit 5be9677

Please sign in to comment.