diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64e2d70..61e1948 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -97,8 +97,6 @@ set(TERMINALWIDGET_VERSION_MAJOR "0")
 set(TERMINALWIDGET_VERSION_MINOR "14")
 set(TERMINALWIDGET_VERSION_PATCH "1")
 
-add_subdirectory(3rdparty/terminalwidget)
-
 include_directories(${DtkWidget_INCLUDE_DIRS})
 include_directories(${DtkGui_INCLUDE_DIRS})
 include_directories(${DtkCore_INCLUDE_DIRS})
@@ -110,7 +108,6 @@ include_directories("src/main")
 include_directories("src/remotemanage")
 include_directories("src/settings")
 include_directories("src/views")
-include_directories("3rdparty/terminalwidget/lib")
 
 set(LINK_LIBS
     Qt${QT_VERSION_MAJOR}::Core
@@ -265,7 +262,8 @@ target_include_directories(${EXE_NAME}
     ${XCB_EWMH_INCLUDE_DIRS}
 )
 
-target_link_libraries (deepin-terminal ${LINK_LIBS} terminalwidget${QT_DESIRED_VERSION})
+find_package(qtermwidget6 REQUIRED)
+target_link_libraries (deepin-terminal ${LINK_LIBS} qtermwidget6)
 
 # Install settings
 
