diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 7579061..8277385 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -5,6 +5,16 @@ on: branches: - main pull_request: + workflow_dispatch: + inputs: + use_cache: + description: 'Use cache for this run' + required: true + default: 'true' + num_build_jobs: + description: 'Number of build jobs' + required: true + default: '2' jobs: build: @@ -30,6 +40,7 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Cache build directory + if: github.event_name != 'workflow_dispatch' || github.event.inputs.use_cache == 'true' uses: actions/cache@v3 with: path: build @@ -51,6 +62,7 @@ jobs: cache-to: type=gha,mode=max build-args: | BUILDKIT_INLINE_CACHE=1 + RAWHASH_NUM_BUILD_JOBS=${{ github.event.inputs.num_build_jobs || '2' }} - name: Extract build directory from Docker image run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 8c94148..3953cca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 3.10) -project(RawHash2) +project(RawHash2Root) add_subdirectory(src) diff --git a/Dockerfile b/Dockerfile index c298825..4792071 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,10 @@ RUN apt-get update && apt-get install -y \ WORKDIR /rawhash2 COPY . /rawhash2 +ARG RAWHASH_NUM_BUILD_JOBS RUN mkdir -p build && cd build \ && cmake .. \ - && make -j 3 + && make -j $RAWHASH_NUM_BUILD_JOBS ENTRYPOINT ["./build/bin/rawhash2"] diff --git a/README.md b/README.md index b31bb44..d7f1b3a 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ cd rawhash2 && git submodule update --init --recursive # if not doing a fresh clone, make sure that the submodules don't have anything built from previous makefile-based # setup , i.e. delete extern directory, then initialize submodules as above (mkdir -p build && cd build && cmake .. && make -j) -build/bin/rawhash2 +build/bin/rawhash2 -h ``` Troubleshooting: @@ -54,6 +54,26 @@ Troubleshooting: If the compilation is successful, the default path to the binary will be `build/bin/rawhash2`. +* Installation + +You can install RawHash2 into the CMake-provided platform-specific destination (e.g. `/usr/local/` on UNIX) with `make install`: + +```bash +make install +rawhash2 -h +``` + +Installation directory can be overridden by providing `-DCMAKE_INSTALL_PREFIX=...` argument to the `cmake ..` command, e.g. + +```bash +cmake -DCMAKE_INSTALL_PREFIX=./install .. +make -j +make install +./install/bin/rawhash2 -h +``` + +Note that `CMAKE_INSTALL_PREFIX` is a cached variable in CMake. + ## Compiling with HDF5, SLOW5, and POD5 We are aware that some of the pre-compiled libraries (e.g., POD5) may not work in your system and you may need to compile these libraries from scratch. Additionally, it may be possible that you may not want to compile any of the HDF5, SLOW5, or POD5 libraries if you are not going to use them. RawHash2 provides several CMake options to enable custom compilation of these libraries. diff --git a/cmake/SetupHDF5.cmake b/cmake/SetupHDF5.cmake index ca60beb..dae4c68 100644 --- a/cmake/SetupHDF5.cmake +++ b/cmake/SetupHDF5.cmake @@ -1,9 +1,18 @@ -include(${CMAKE_CURRENT_LIST_DIR}/Util.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/Utils.cmake) -function(setup_hdf5 TARGET_NAME) +function(add_hdf5_to_target TARGET_NAME) if(NOHDF5) target_compile_definitions(${TARGET_NAME} PRIVATE NHDF5RH=1) else() + if(HDF5_COMPILE) + add_dependencies(${TARGET_NAME} hdf5_build) + endif() + add_imported_library(${TARGET_NAME} hdf5) + endif() +endfunction() + +function(setup_hdf5) + if(NOT NOHDF5) # print HDF5_DIR message(STATUS "EXTERNAL_PROJECTS_BUILD_DIR: ${EXTERNAL_PROJECTS_BUILD_DIR}") message(STATUS "HDF5_DIR: ${HDF5_DIR}") @@ -15,18 +24,18 @@ function(setup_hdf5 TARGET_NAME) set(HDF5_BUILD_DIR ${HDF5_DIR}/build) ExternalProject_Add( hdf5_build + BUILD_ALWAYS 1 # Rebuild if local checkout is updated SOURCE_DIR ${HDF5_SOURCE_DIR} BINARY_DIR ${HDF5_BUILD_DIR} CONFIGURE_COMMAND ${HDF5_SOURCE_DIR}/configure --enable-threadsafe --disable-hl --prefix=${HDF5_BUILD_DIR} # INSTALL_DIR and DCMAKE_INSTALL_PREFIX are ignored by hdf5 INSTALL_COMMAND make install prefix=${HDF5_DIR} ) - add_dependencies(${TARGET_NAME} hdf5_build) else() if(NOT HDF5_DIR) message(FATAL_ERROR "HDF5_COMPILE is OFF, but no dir provided") endif() endif() - link_imported_library(${TARGET_NAME} hdf5 ${HDF5_DIR}) + define_imported_library(hdf5 ${HDF5_DIR} SHARED) endif() endfunction() diff --git a/cmake/SetupPOD5.cmake b/cmake/SetupPOD5.cmake index 008a4b2..9acc711 100644 --- a/cmake/SetupPOD5.cmake +++ b/cmake/SetupPOD5.cmake @@ -1,22 +1,45 @@ -include(${CMAKE_CURRENT_LIST_DIR}/Util.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/Utils.cmake) -function(setup_zstd TARGET_NAME) -set(ZSTD_DIR ${EXTERNAL_PROJECTS_BUILD_DIR}/zstd) +function(add_zstd_to_target TARGET_NAME) + set(ZSTD_DIR ${EXTERNAL_PROJECTS_BUILD_DIR}/zstd) + add_dependencies(${TARGET_NAME} zstd_build) + add_imported_library(${TARGET_NAME} zstd) +endfunction() + +function(setup_zstd) + set(ZSTD_DIR ${EXTERNAL_PROJECTS_BUILD_DIR}/zstd) ExternalProject_Add( zstd_build + BUILD_ALWAYS 1 # Rebuild if local checkout is updated SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/zstd/build/cmake BINARY_DIR ${ZSTD_DIR}/build CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${ZSTD_DIR} ) - add_dependencies(${TARGET_NAME} zstd_build) - link_imported_library(${TARGET_NAME} zstd ${ZSTD_DIR}) + define_imported_library(zstd ${ZSTD_DIR} SHARED) endfunction() -function(setup_pod5 TARGET_NAME) +function(add_pod5_to_target TARGET_NAME) if(NOPOD5) target_compile_definitions(${TARGET_NAME} PRIVATE NPOD5RH=1) else() - setup_zstd(${TARGET_NAME}) + add_zstd_to_target(${TARGET_NAME}) + + set(POD5_VERSION "0.2.2") + set(POD5_URLDIR "pod5-${POD5_VERSION}-${CMAKE_SYSTEM_NAME}") + set(POD5_REPO "https://github.com/nanoporetech/pod5-file-format") + + resolve_pod5_url() + + if(POD5_DOWNLOAD) + add_dependencies(${TARGET_NAME} pod5_download) + endif() + target_link_libraries(${TARGET_NAME} PRIVATE ${POD5_LIBRARIES}) + endif() +endfunction() + +function(setup_pod5) + if(NOT NOPOD5) + setup_zstd() set(POD5_VERSION "0.2.2") set(POD5_URLDIR "pod5-${POD5_VERSION}-${CMAKE_SYSTEM_NAME}") @@ -45,7 +68,6 @@ function(setup_pod5 TARGET_NAME) endif() endif() include_directories(${POD5_DIR}/include) - target_link_libraries(${TARGET_NAME} PRIVATE ${POD5_LIBRARIES} zstd) endif() endfunction() @@ -79,7 +101,7 @@ endfunction() # not working because of improper design, PARENT_SCOPE should not be used, rather define targets properly -# include(${CMAKE_CURRENT_LIST_DIR}/Util.cmake) +# include(${CMAKE_CURRENT_LIST_DIR}/Utils.cmake) # set(ZSTD_DIR ${EXTERNAL_PROJECTS_BUILD_DIR}/zstd) diff --git a/cmake/SetupRUClient.cmake b/cmake/SetupRUClient.cmake index 00d5d98..c817827 100644 --- a/cmake/SetupRUClient.cmake +++ b/cmake/SetupRUClient.cmake @@ -1,23 +1,22 @@ -include(${CMAKE_CURRENT_LIST_DIR}/Util.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/Utils.cmake) -function(setup_ruclient TARGET_NAME) +function(add_ruclient_to_target TARGET_NAME) + if(RUCLIENT_ENABLED) + set_target_properties(${TARGET_NAME} PROPERTIES CXX_STANDARD 20) + target_compile_definitions(${TARGET_NAME} PRIVATE RUCLIENT_ENABLED) + target_sources(${TARGET_NAME} PRIVATE rawhash_ruclient.cpp) + target_link_libraries(${TARGET_NAME} PRIVATE ont_device_client_LIB ru_method_LIB) + endif() +endfunction() + +function(setup_ruclient) if(RUCLIENT_ENABLED) - set_target_properties(${TARGET_NAME} PROPERTIES CXX_STANDARD 20) - target_compile_definitions(${TARGET_NAME} PRIVATE RUCLIENT_ENABLED) - target_sources(${TARGET_NAME} PRIVATE rawhash_ruclient.cpp) if(NOT RUCLIENT_DIR) override_cached(RUCLIENT_DIR ${EXTERNAL_PROJECTS_BUILD_DIR}/ruclient) endif() - ExternalProject_Add( - ruclient_build - SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/readuntil_fake - BINARY_DIR ${RUCLIENT_DIR}/build - CMAKE_ARGS - -DCMAKE_INSTALL_PREFIX=${RUCLIENT_DIR} - ) - add_dependencies(${TARGET_NAME} ruclient_build) - include_directories(${RUCLIENT_DIR}/include) - message(STATUS "ruclient enabled") + set(RUCLIENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/readuntil_fake) + add_subdirectory(${RUCLIENT_SOURCE_DIR} ${RUCLIENT_DIR}) + include_directories(${RUCLIENT_SOURCE_DIR}/include) else() message(STATUS "ruclient disabled") endif() diff --git a/cmake/SetupRawHashLikeTarget.cmake b/cmake/SetupRawHashLikeTarget.cmake index 9a43cf3..72bb806 100644 --- a/cmake/SetupRawHashLikeTarget.cmake +++ b/cmake/SetupRawHashLikeTarget.cmake @@ -1,3 +1,15 @@ +include(${CMAKE_CURRENT_LIST_DIR}/SetupRUClient.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/SetupPOD5.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/SetupHDF5.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/SetupSLOW5.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/SetupTFLite.cmake) + +setup_pod5() +setup_ruclient() +setup_hdf5() +setup_slow5() +setup_tflite() + function(setup_rawhashlike_target TARGET_NAME) # if(PYBINDING) # message(FATAL_ERROR "Building with Python binding support is not implemented") @@ -77,4 +89,10 @@ function(setup_rawhashlike_target TARGET_NAME) PROFILERH=1 ) endif() + + add_pod5_to_target(${TARGET_NAME}) + add_hdf5_to_target(${TARGET_NAME}) + add_slow5_to_target(${TARGET_NAME}) + add_tflite_to_target(${TARGET_NAME}) + add_ruclient_to_target(${TARGET_NAME}) endfunction() diff --git a/cmake/SetupSLOW5.cmake b/cmake/SetupSLOW5.cmake index cd9770b..ec04a38 100644 --- a/cmake/SetupSLOW5.cmake +++ b/cmake/SetupSLOW5.cmake @@ -1,9 +1,18 @@ -include(${CMAKE_CURRENT_LIST_DIR}/Util.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/Utils.cmake) -function(setup_slow5 TARGET_NAME) +function(add_slow5_to_target TARGET_NAME) if(NOSLOW5) target_compile_definitions(${TARGET_NAME} PRIVATE NSLOW5RH=1) else() + if(SLOW5_COMPILE) + add_dependencies(${TARGET_NAME} slow5_build) + endif() + add_imported_library(${TARGET_NAME} slow5) + endif() +endfunction() + +function(setup_slow5) + if(NOT NOSLOW5) set(SLOW5_SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/slow5lib) if(SLOW5_COMPILE) if(NOT SLOW5_DIR) @@ -12,6 +21,7 @@ function(setup_slow5 TARGET_NAME) message(STATUS "Compiling slow5 to ${SLOW5_DIR}") ExternalProject_Add( slow5_build + BUILD_ALWAYS 1 # Rebuild if local checkout is updated BINARY_DIR ${SLOW5_DIR} SOURCE_DIR ${SLOW5_SOURCE_DIR} INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${SLOW5_SOURCE_DIR}/include ${SLOW5_DIR}/include @@ -19,13 +29,12 @@ function(setup_slow5 TARGET_NAME) && ${CMAKE_COMMAND} -E rename ${SLOW5_DIR}/libslow5.so ${SLOW5_DIR}/lib/libslow5.so ) message(STATUS "Current dir: ${CMAKE_CURRENT_BINARY_DIR}") - add_dependencies(${TARGET_NAME} slow5_build) else() if(NOT SLOW5_DIR) message(FATAL_ERROR "SLOW5_COMPILE is OFF, but no dir provided") endif() endif() message(STATUS "Using slow5 from ${SLOW5_DIR}") - link_imported_library(${TARGET_NAME} slow5 ${SLOW5_DIR}) + define_imported_library(slow5 ${SLOW5_DIR} SHARED) endif() endfunction() diff --git a/cmake/SetupTFLite.cmake b/cmake/SetupTFLite.cmake index 97bb5ee..49fdc31 100644 --- a/cmake/SetupTFLite.cmake +++ b/cmake/SetupTFLite.cmake @@ -1,8 +1,11 @@ -include(${CMAKE_CURRENT_LIST_DIR}/Util.cmake) +include(${CMAKE_CURRENT_LIST_DIR}/Utils.cmake) -function(setup_tflite TARGET_NAME) +function(add_tflite_to_target TARGET_NAME) + target_link_libraries(${TARGET_NAME} PRIVATE tensorflow-lite) +endfunction() + +function(setup_tflite) set(TF_SOURCE_DIR ${CMAKE_SOURCE_DIR}/extern/tensorflow) add_subdirectory(${TF_SOURCE_DIR}/tensorflow/lite ${EXTERNAL_PROJECTS_BUILD_DIR}/tflite EXCLUDE_FROM_ALL) include_directories(${TF_SOURCE_DIR}) - target_link_libraries(${TARGET_NAME} PRIVATE tensorflow-lite) endfunction() diff --git a/cmake/Util.cmake b/cmake/Util.cmake deleted file mode 100644 index f062898..0000000 --- a/cmake/Util.cmake +++ /dev/null @@ -1,31 +0,0 @@ -include(ExternalProject) - -function(override_cached name value) - message(STATUS "Overriding ${name} to ${value}") - get_property(doc_string CACHE ${name} PROPERTY HELPSTRING) - get_property(type CACHE ${name} PROPERTY TYPE) - set(${name} ${value} CACHE ${type} ${doc_string} FORCE) -endfunction() - -function(link_imported_library TARGET_NAME LIB_NAME LIB_DIR) - add_library(${LIB_NAME} SHARED IMPORTED) - file(MAKE_DIRECTORY ${LIB_DIR}/include) - set_target_properties(${LIB_NAME} PROPERTIES - IMPORTED_LOCATION ${LIB_DIR}/lib/lib${LIB_NAME}.so - INTERFACE_INCLUDE_DIRECTORIES ${LIB_DIR}/include - ) - target_link_libraries(${TARGET_NAME} PRIVATE ${LIB_NAME}) -endfunction() - -function(check_directory_exists_and_non_empty DIR) - if(NOT EXISTS ${DIR}) - message(FATAL_ERROR "Directory ${DIR} does not exist.") - endif() - - file(GLOB DIRECTORY_CONTENTS "${DIR}/*") - if(DIRECTORY_CONTENTS STREQUAL "") - message(FATAL_ERROR "Directory ${DIR} is empty.") - endif() - - message(STATUS "Directory ${DIR} exists and is non-empty.") -endfunction() diff --git a/cmake/Utils.cmake b/cmake/Utils.cmake new file mode 100644 index 0000000..4c827db --- /dev/null +++ b/cmake/Utils.cmake @@ -0,0 +1,45 @@ +include(ExternalProject) + +function(override_cached name value) + message(STATUS "Overriding ${name} to ${value}") + get_property(doc_string CACHE ${name} PROPERTY HELPSTRING) + get_property(type CACHE ${name} PROPERTY TYPE) + set(${name} ${value} CACHE ${type} ${doc_string} FORCE) +endfunction() + + +function(add_imported_library TARGET_NAME LIB_NAME) + target_link_libraries(${TARGET_NAME} PRIVATE ${LIB_NAME}_RAWHASH_LIB) +endfunction() + +function(define_imported_library LIB_NAME LIB_DIR LIB_TYPE) + add_library(${LIB_NAME}_RAWHASH_LIB ${LIB_TYPE} IMPORTED) + set(EXTENSION ".a") + if(LIB_TYPE STREQUAL SHARED) + set(EXTENSION ".so") + endif() + set_target_properties(${LIB_NAME}_RAWHASH_LIB PROPERTIES + IMPORTED_LOCATION ${LIB_DIR}/lib/lib${LIB_NAME}${EXTENSION} + INTERFACE_INCLUDE_DIRECTORIES ${LIB_DIR}/include) + file(MAKE_DIRECTORY ${LIB_DIR}/include) + # Can't install(TARGETS ...) for external projects + # Also some .so are symlinks, so install all + install(DIRECTORY ${LIB_DIR}/lib/ DESTINATION lib + FILES_MATCHING PATTERN *${EXTENSION}*) + install(DIRECTORY ${LIB_DIR}/include/ + DESTINATION include/${PROJECT_NAME}) +endfunction() + + +function(check_directory_exists_and_non_empty DIR) + if(NOT EXISTS ${DIR}) + message(FATAL_ERROR "Directory ${DIR} does not exist.") + endif() + + file(GLOB DIRECTORY_CONTENTS "${DIR}/*") + if(DIRECTORY_CONTENTS STREQUAL "") + message(FATAL_ERROR "Directory ${DIR} is empty.") + endif() + + message(STATUS "Directory ${DIR} exists and is non-empty.") +endfunction() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1377d81..ba9d5df 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.10) -project(RawHash2Src) +project(RawHash2) # option(USE_CCACHE "Use ccache to speed up rebuilds" ON) # option(USE_MOLD "Use mold linker for faster linking" ON) @@ -26,7 +26,7 @@ option(RUCLIENT_ENABLED "Enable ReadUntil client" OFF) set(POD5_DIR "" CACHE PATH "Path to POD5 directory (already built or where it should be built)") set(HDF5_DIR "" CACHE PATH "Path to HDF5 directory (already built or where it should be built)") set(SLOW5_DIR "" CACHE PATH "Path to SLOW5 directory (already built or where it should be built)") -set(RUCLIENT_DIR "" CACHE PATH "Path to ReadUntil directory (already built or where it should be built)") +set(RUCLIENT_DIR "" CACHE PATH "Path to ReadUntil directory (where it should be built)") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin CACHE PATH "Directory where to put binaries") @@ -34,62 +34,28 @@ set(EXTERNAL_PROJECTS_BUILD_DIR ${CMAKE_BINARY_DIR}/extern) # default build dire file(MAKE_DIRECTORY ${EXTERNAL_PROJECTS_BUILD_DIR}) message(STATUS "External projects build directory: ${EXTERNAL_PROJECTS_BUILD_DIR}") -include(../cmake/SetupCCacheMold.cmake) -include(../cmake/SetupRawHashLikeTarget.cmake) -include(../cmake/SetupRUClient.cmake) -include(../cmake/SetupPOD5.cmake) -include(../cmake/SetupHDF5.cmake) -include(../cmake/SetupSLOW5.cmake) -include(../cmake/SetupTFLite.cmake) +include(${CMAKE_SOURCE_DIR}/cmake/SetupCCacheMold.cmake) +include(${CMAKE_SOURCE_DIR}/cmake/SetupRawHashLikeTarget.cmake) set(CMAKE_VERBOSE_MAKEFILE TRUE CACHE BOOL "verbose makefile" FORCE) # print compilation commands enable_ccache() set_alternate_linker(mold) -# todo: currently can only compile rawhash2 or the below, not both -# this happens because functions like setup_hdf5 define the hdf5 target and the relationship to the target name -# rather than doing it separately -set(build_cli ON) +add_executable(rawhash2_builtin main.cpp) +setup_rawhashlike_target(rawhash2_builtin) -if (build_cli) - message(STATUS "Building CLI") - - set(TARGET_NAME rawhash2) - add_executable(${TARGET_NAME} main.cpp) - setup_rawhashlike_target(${TARGET_NAME}) - setup_pod5(${TARGET_NAME}) - setup_ruclient(${TARGET_NAME}) - setup_hdf5(${TARGET_NAME}) - setup_slow5(${TARGET_NAME}) - setup_tflite(${TARGET_NAME}) +add_library(rawhash2_lib SHARED rawhash_wrapper.cpp rawhash_wrapper.hpp) +setup_rawhashlike_target(rawhash2_lib) -else() - message(STATUS "Building shared library") +file(GLOB_RECURSE HEADER_FILES ${CMAKE_SOURCE_DIR}/src/*.h ${CMAKE_SOURCE_DIR}/src/*.hpp) +set_property(TARGET rawhash2_lib PROPERTY PUBLIC_HEADER ${HEADER_FILES}) +set_target_properties(rawhash2_lib PROPERTIES INSTALL_RPATH $ORIGIN OUTPUT_NAME rawhash2) +install(TARGETS rawhash2_lib + LIBRARY DESTINATION lib + PUBLIC_HEADER DESTINATION include/${PROJECT_NAME}) - # set(TARGET_NAME rawhash2_wrapper_example) - # add_executable(${TARGET_NAME} wrapper_example.cpp rawhash_wrapper.cpp rawhash_wrapper.hpp) - set(TARGET_NAME rawhash2_wrapper) - add_library(${TARGET_NAME} SHARED rawhash_wrapper.cpp rawhash_wrapper.hpp) - setup_rawhashlike_target(${TARGET_NAME}) - setup_pod5(${TARGET_NAME}) - setup_ruclient(${TARGET_NAME}) - setup_hdf5(${TARGET_NAME}) - setup_slow5(${TARGET_NAME}) - setup_tflite(${TARGET_NAME}) - - set(TARGET_NAME rawhash2_usinglib) - add_executable(${TARGET_NAME} wrapper_example.cpp) - target_link_libraries(${TARGET_NAME} PRIVATE rawhash2_wrapper) - # setup_rawhashlike_target(${TARGET_NAME}) - # # setup_pod5(${TARGET_NAME}) - # target_compile_definitions(${TARGET_NAME} PRIVATE NPOD5RH=1) # todo: workaround - # setup_ruclient(${TARGET_NAME}) - # setup_hdf5(${TARGET_NAME}) - # setup_slow5(${TARGET_NAME}) - # setup_tflite(${TARGET_NAME}) -endif() - - -# setup_pod5() -# add_pod5_to_target(${TARGET_NAME}) +add_executable(rawhash2 wrapper_example.cpp) +target_link_libraries(rawhash2 PRIVATE rawhash2_lib) +set_target_properties(rawhash2 PROPERTIES INSTALL_RPATH $ORIGIN/../lib) +install(TARGETS rawhash2 RUNTIME DESTINATION bin)