PKGNAME=flann
PKGSEC=libs
PKGDEP="hdf5 lz4 python-3"
BUILDDEP="texlive"
# FIXME: CUDA is currently incompatible with GCC 13. Reinstate these build
# dependencies when support is available.
#BUILDDEP__AMD64="${BUILDDEP} cuda"
#BUILDDEP__ARM64="${BUILDDEP} cuda"
PKGDES="A library for performing fast approximate nearest neighbor searches in high dimensional spaces"

CMAKE_AFTER=(
    -DBUILD_C_BINDINGS=ON
    -DBUILD_PYTHON_BINDINGS=ON
    -DBUILD_MATLAB_BINDINGS=ON
    -DBUILD_CUDA_LIB=OFF
    -DBUILD_EXAMPLES=ON
    -DBUILD_DOC=ON
    -DUSE_OPENMP=ON
    -DUSE_MPI=ON
)
# FIXME: CUDA is currently incompatible with GCC 13. Enable this feature when
# support is available.
CMAKE_AFTER__AMD64=(
    ${CMAKE_AFTER}
    -DBUILD_CUDA_LIB=OFF
)
CMAKE_AFTER__ARM64=(
    ${CMAKE_AFTER}
    -DBUILD_CUDA_LIB=OFF
)

# Note: Needed for pcl.
NOSTATIC=0
