$NetBSD$

# Unbundle htslib

--- src/CMakeLists.txt.orig	2023-07-06 14:07:38 UTC
+++ src/CMakeLists.txt
@@ -3,10 +3,6 @@ file(GLOB headers *.h *.hpp)
 
 list(REMOVE_ITEM sources main.cpp)
 
-if (USE_BAM)
-include_directories(../ext/htslib)
-endif(USE_BAM)
-
 add_compile_options(-Wno-subobject-linkage) # Suppress bifrost warning
 
 add_library(kallisto_core ${sources} ${headers})
@@ -17,7 +13,7 @@ add_executable(kallisto main.cpp)
 find_package( Threads REQUIRED )
 ExternalProject_Get_Property(bifrost install_dir)
 if (USE_BAM)
-target_link_libraries(kallisto kallisto_core pthread ${CMAKE_CURRENT_SOURCE_DIR}/../ext/htslib/libhts.a ${install_dir}/build/src/libbifrost.a)
+target_link_libraries(kallisto kallisto_core pthread hts ${install_dir}/build/src/libbifrost.a)
 else()
 target_link_libraries(kallisto kallisto_core pthread ${install_dir}/build/src/libbifrost.a)
 endif(USE_BAM)
