Skip to content

Commit

Permalink
added htslib through pkg-config
Browse files Browse the repository at this point in the history
  • Loading branch information
riasc committed Nov 20, 2024
1 parent 7362973 commit b2bc5f8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions cli/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,21 @@ CPMAddPackage(
GIT_TAG v1.3.1
)

find_package(PkgConfig REQUIRED)
pkg_check_modules(HTSLIB REQUIRED IMPORTED_TARGET htslib)


file(GLOB GG_LIB_SOURCES "../src/*.cpp")
file(GLOB GG_CLI_SOURCES "src/*.cpp")

add_executable(genogrove_cli ${GG_LIB_SOURCES} ${GG_CLI_SOURCES})
target_include_directories(genogrove_cli PUBLIC "${cxxopts_SOURCE_DIR}/include/") # cxxopts header files
target_include_directories(genogrove_cli PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../include/") # genogrove header files
target_include_directories(genogrove_cli PUBLIC ${HTSLIB_INCLUDE_DIRS}) # htslib header files
target_include_directories(genogrove_cli PUBLIC include) # cli header files

target_link_libraries(genogrove_cli cxxopts zlibstatic)
target_link_libraries(genogrove_cli ${HTSLIB_LIBRARIES}) # htslib libraries

# set the output directory for the executable
set_target_properties(genogrove_cli PROPERTIES
Expand Down

0 comments on commit b2bc5f8

Please sign in to comment.