File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ if(STATIC_ANALYSIS)
4040 include (cmake/static_analysis.cmake)
4141endif ()
4242
43+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR} /cmake" )
44+
4345add_compile_options (
4446 -Wall
4547 -Wextra
@@ -49,6 +51,8 @@ add_compile_options(
4951)
5052
5153file (GLOB cpp_files "*.cpp" )
54+ # exclude htslib_wrapper unless (below) USE_HTSLIB is set
55+ list (FILTER cpp_files EXCLUDE REGEX "htslib_wrapper.cpp" )
5256
5357set (LIBRARY_OBJECTS "" )
5458foreach (cpp_file ${cpp_files} )
@@ -57,6 +61,17 @@ foreach(cpp_file ${cpp_files})
5761 list (APPEND LIBRARY_OBJECTS ${BASE_NAME} )
5862endforeach ()
5963
64+ if (USE_HTSLIB)
65+ find_package (HTSLIB REQUIRED)
66+ find_package (Threads REQUIRED)
67+ add_library (htslib_wrapper OBJECT htslib_wrapper.cpp)
68+ list (APPEND LIBRARY_OBJECTS htslib_wrapper)
69+ target_link_libraries (htslib_wrapper PUBLIC
70+ HTSLIB::HTSLIB
71+ Threads::Threads
72+ )
73+ endif ()
74+
6075add_library (smithlab_cpp)
6176target_include_directories (smithlab_cpp PUBLIC
6277 ${CMAKE_CURRENT_SOURCE_DIR}
You can’t perform that action at this time.
0 commit comments