File deepin-terminal_unbundle_vte.patch of Package deepin-terminal

diff -Nur deepin-terminal-2.9.1/CMakeLists.txt deepin-terminal-2.9.1-new/CMakeLists.txt
--- deepin-terminal-2.9.1/CMakeLists.txt	2017-11-27 22:44:15.000000000 +0800
+++ deepin-terminal-2.9.1-new/CMakeLists.txt	2017-11-29 10:02:02.393701879 +0800
@@ -18,6 +18,7 @@
 find_package(Gettext)
 
 pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
+pkg_check_modules(VTE REQUIRED vte-2.91)
 pkg_check_modules(GEE REQUIRED gee-0.8)
 pkg_check_modules(GIO REQUIRED gio-unix-2.0)
 pkg_check_modules(RSVG REQUIRED librsvg-2.0)
@@ -25,14 +26,6 @@
 pkg_check_modules(FONTCONFIG REQUIRED fontconfig)
 pkg_check_modules(GLIB REQUIRED glib-2.0)
 
-ExternalProject_Add(Vte-0.29
-  SOURCE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/vte-0.50.1
-  CONFIGURE_COMMAND ./configure --enable-static
-  BUILD_COMMAND make
-  INSTALL_COMMAND ""
-  BUILD_IN_SOURCE 1
-  )
-
 ExternalProject_Add(zssh-1.5c
   SOURCE_DIR ${CMAKE_SOURCE_DIR}/3rdparty/zssh-1.5c
   CONFIGURE_COMMAND ./configure
@@ -60,9 +53,8 @@
 	${RSVG_INCLUDE_DIRS}
 	${JsonGlib_INCLUDE_DIRS}
 	${LIBSECRET_INCLUDE_DIRS}
-	${CMAKE_SOURCE_DIR}/3rdparty/vte-0.50.1/src
+    ${VTE_INCLUDE_DIRS}
 )
-find_library(VTE_LIB NAMES libvte-2.91.a tcmalloc_minimal)
 include_directories(${INCLUDE_PATHS})
 set(LIBS
 	${GIO_LIBRARIES}
@@ -72,17 +64,12 @@
 	${RSVG_LIBRARIES}
 	${JsonGlib_LIBRARIES}
 	${LIBSECRET_LIBRARIES}
-	${ZLIB_LIBRARIES}
+	${VTE_LIBRARIES}
 	${X11_LIBRARIES}
 	${XTST_LIBRARIES}
 	${FONTCONFIG_LIBRARY}
 	${M_LIBRARIES}
-	stdc++
 	m
-	z
-	pthread
-	gnutls
-	pcre2-8
 )
 vala_precompile(VALA_C
 	./lib/animation.vala
@@ -165,8 +152,7 @@
 	librsvg-2.0
 )
 add_executable(${target} ${VALA_C} ${CMAKE_SOURCE_DIR}/project_path.c ${CMAKE_SOURCE_DIR}/lib/font.c)
-target_link_libraries(${target} ${LIBS} ${CMAKE_SOURCE_DIR}/3rdparty/vte-0.50.1/src/.libs/libvte-2.91.a)
-add_dependencies(${target} Vte-0.29)
+target_link_libraries(${target} ${LIBS})
 
 FILE(GLOB children LIST_DIRECTORIES true po/*)
 SET(dirlist "")
openSUSE Build Service is sponsored by