yangao07 / abPOA

abPOA: an SIMD-based C library for fast partial order alignment using adaptive band
MIT License
111 stars 18 forks source link

header installation :: bad location #32

Closed EricDeveaud closed 2 years ago

EricDeveaud commented 2 years ago

Hello

using release taged archive for version 1.2.5 (https://github.com/yangao07/abPOA/releases/download/v1.2.5/abPOA-v1.2.5.tar.gz)

make install instatll header in a non standard location plus install non necessary stuff (*.c) that leads to non buildable example with installed headers see

rpmmaker:~ > wget https://github.com/yangao07/abPOA/releases/download/v1.2.5/abPOA-v1.2.5.tar.gz)
rpmmaker:~ > tar xf abPOA-v1.2.5.tar.gz
rpmmaker:~ > mkdir build && cd build
rpmmaker:~/build > cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/tmp/abPOA ../abPOA-v1.2.5 && make -j && make install

when we check the installed include directory it will find:

rpm_maker:~/build > ls /tmp/abPOA/include -R
/tmp/abPOA/include:
src

/tmp/abPOA/include/src:
abpoa.c        abpoa_graph.c  abpoa_seed.h  kalloc.h  ksort.h    simd_abpoa_align.c  utils.c
abpoa.h        abpoa_graph.h  abpoa_seq.c   kdq.h     kstring.c  simd_abpoa_align.h  utils.h
abpoa_align.c  abpoa_plot.c   abpoa_seq.h   khash.h   kstring.h  simd_check.c
abpoa_align.h  abpoa_seed.c   kalloc.c      kseq.h    kvec.h     simd_instruction.h

we expect header to be placed directly in include or maybee include/abPOA

this is due to the way that CMakfileLists.txt is defined for include files

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

should be

install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} FILES_MATCHING PATTERN "*.h")

regards

Eric

yangao07 commented 2 years ago

Just fixed this in the latest commit (92e0f8a).