Author: Andreas Tille <tille@debian.org>
Last-Update: 2021-01-28
Description: Use Debian packaged libsmithwaterman
Forwarded: not-needed
--- libvcflib.orig/src/Variant.h
+++ libvcflib/src/Variant.h
@@ -27,7 +27,7 @@
 #include "split.h"
 #include "join.h"
 #include <tabix.hpp>
-#include "SmithWatermanGotoh.h"
+#include <smithwaterman/SmithWatermanGotoh.h>
 #include "ssw_cpp.hpp"
 #include "convert.h"
 #include "multichoose.h"
--- libvcflib.orig/CMakeLists.txt
+++ libvcflib/CMakeLists.txt
@@ -32,6 +32,7 @@
 
 pkg_check_modules(HTSLIB htslib)
 pkg_check_modules(TABIXPP tabixpp) # Optional
+pkg_check_modules(SMITHWATERMAN REQUIRED IMPORTED_TARGET libsmithwaterman)
 
 # ---- Build switches
 
@@ -55,7 +56,6 @@
 include_directories(include)
 include_directories(fastahack)
 include_directories(intervaltree)
-include_directories(smithwaterman)
 include_directories(multichoose)
 include_directories(filevercmp)
 
@@ -70,7 +70,6 @@
   src/*.h*
   multichoose/*.h*
   intervaltree/*.h*
-  smithwaterman/*.h*
   fastahack/*.h*
   filevercmp/*.h*)
 
@@ -91,14 +90,13 @@
     src/ssw.hpp
     src/ssw_cpp.hpp
     fastahack/Fasta.cpp
-    smithwaterman/SmithWatermanGotoh.cpp
-    smithwaterman/Repeats.cpp
-    smithwaterman/IndelAllele.cpp
-    smithwaterman/disorder.cpp
-    smithwaterman/LeftAlign.cpp
     filevercmp/filevercmp.c
     )
 
+target_link_libraries(vcflib
+    PkgConfig::SMITHWATERMAN
+    )
+
 set(BINS
     vcfecho
     dumpContigsFromHeader
