Skip to content

Commit

Permalink
fix: 修复后端为qt5启动 (#175)
Browse files Browse the repository at this point in the history
修复后端为qt5启动

Log: 修复后端为qt5启动
  • Loading branch information
lzwind authored Jan 17, 2025
1 parent c3f8d9e commit 99f5660
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
7 changes: 7 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Priority: optional
Maintainer: Deepin Packages Builder <[email protected]>
Build-Depends: debhelper (>= 9),
pkg-config,
qt5-qmake,
qtbase5-dev,
libdtkwidget-dev,
libdtkcore-dev,
libdtkgui-dev,
libdtkcore5-bin,
qttools5-dev-tools,
qt6-base-dev,
libqt6core5compat6-dev,
libdtk6widget-dev,
Expand Down
12 changes: 6 additions & 6 deletions src/dde-grand-search-daemon/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# 定义需要的cmake版本
cmake_minimum_required(VERSION 3.10)

set(QT_NS Qt5)
set(DTK_NS Dtk)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
Expand Down Expand Up @@ -213,12 +216,9 @@ set(SRCS
${GDCONFIGURATION}
)

# 资源文件
if (QT_VERSION_MAJOR EQUAL 6)
qt6_add_resources(QRC_FILES utils/dict.qrc)
else()
qt5_add_resources(QRC_FILES utils/dict.qrc)
endif()

qt5_add_resources(QRC_FILES utils/dict.qrc)


# 执行程序
add_executable(${BIN_NAME}
Expand Down
6 changes: 3 additions & 3 deletions src/tools/luceneengine/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_AUTOMOC ON)

set(LIB_NAME luceneengine)

find_package(${QT_NS} COMPONENTS Gui REQUIRED)
find_package(Qt5 COMPONENTS Gui REQUIRED)
find_package(PkgConfig REQUIRED)

pkg_check_modules(Lucene REQUIRED IMPORTED_TARGET liblucene++ liblucene++-contrib)
Expand All @@ -30,6 +30,6 @@ target_include_directories(${LIB_NAME}

target_link_libraries(
${LIB_NAME}
${QT_NS}::Gui
Qt5::Gui
PkgConfig::Lucene
)
)
20 changes: 8 additions & 12 deletions src/tools/semanticparser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set(CMAKE_AUTOMOC ON)

set(LIB_NAME semanticparser)

find_package(${QT_NS} COMPONENTS Gui DBus REQUIRED)
find_package(Qt5 COMPONENTS Gui DBus REQUIRED)
find_package(PkgConfig REQUIRED)


Expand All @@ -15,21 +15,17 @@ FILE(GLOB_RECURSE SRC_FILES
"${CMAKE_CURRENT_SOURCE_DIR}/*.cpp"
)

if (QT_VERSION_MAJOR EQUAL 6)
qt6_add_dbus_interface(IFS_SRC ${PROJECT_3RDPARTY_PATH}/interfaces/org.deepin.ai.daemon.VectorIndex.xml vectorindex)
qt6_add_dbus_interface(IFS_SRC ${PROJECT_3RDPARTY_PATH}/interfaces/org.deepin.ai.daemon.QueryLang.xml querylang)
else()
qt5_add_dbus_interface(IFS_SRC ${PROJECT_3RDPARTY_PATH}/interfaces/org.deepin.ai.daemon.VectorIndex.xml vectorindex)
qt5_add_dbus_interface(IFS_SRC ${PROJECT_3RDPARTY_PATH}/interfaces/org.deepin.ai.daemon.QueryLang.xml querylang)
endif()
qt5_add_dbus_interface(IFS_SRC ${PROJECT_3RDPARTY_PATH}/interfaces/org.deepin.ai.daemon.VectorIndex.xml vectorindex)
qt5_add_dbus_interface(IFS_SRC ${PROJECT_3RDPARTY_PATH}/interfaces/org.deepin.ai.daemon.QueryLang.xml querylang)

add_library(${LIB_NAME} STATIC ${SRC_FILES} ${IFS_SRC})

target_include_directories(${LIB_NAME} PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
target_include_directories(${LIB_NAME}
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}
)

target_link_libraries(
${LIB_NAME}
${QT_NS}::Gui
)
Qt5::Gui
)

0 comments on commit 99f5660

Please sign in to comment.