From a09b5d1a23d39344e1d9fdf4bf1e91041d0a99f6 Mon Sep 17 00:00:00 2001 From: Vadim Pisarevsky Date: Tue, 14 Sep 2010 18:13:09 +0000 Subject: [PATCH] flattened flann directory structure; patched zlib to build with Android NDK --- 3rdparty/flann/CMakeLists.txt | 15 +++++---------- 3rdparty/flann/{util => }/allocator.h | 0 3rdparty/flann/{algorithms => }/autotuned_index.h | 0 3rdparty/flann/{util => }/common.h | 0 3rdparty/flann/{algorithms => }/composite_index.h | 0 3rdparty/flann/{algorithms => }/dist.cpp | 0 3rdparty/flann/{algorithms => }/dist.h | 0 3rdparty/flann/{nn => }/ground_truth.h | 0 3rdparty/flann/{util => }/heap.h | 0 3rdparty/flann/{nn => }/index_testing.cpp | 0 3rdparty/flann/{nn => }/index_testing.h | 0 3rdparty/flann/{algorithms => }/kdtree_index.h | 0 3rdparty/flann/{algorithms => }/kmeans_index.h | 0 3rdparty/flann/{algorithms => }/linear_index.h | 0 3rdparty/flann/{util => }/logger.cpp | 0 3rdparty/flann/{util => }/logger.h | 0 3rdparty/flann/{util => }/matrix.h | 0 3rdparty/flann/{algorithms => }/nn_index.h | 0 3rdparty/flann/{util => }/object_factory.h | 0 3rdparty/flann/{util => }/random.cpp | 0 3rdparty/flann/{util => }/random.h | 0 3rdparty/flann/{util => }/result_set.h | 0 3rdparty/flann/{util => }/saving.cpp | 0 3rdparty/flann/{util => }/saving.h | 0 3rdparty/flann/{nn => }/simplex_downhill.h | 0 3rdparty/flann/{util => }/timer.h | 0 3rdparty/zlib/gzguts.h | 6 +++++- 3rdparty/zlib/zutil.h | 7 +++++++ 28 files changed, 17 insertions(+), 11 deletions(-) rename 3rdparty/flann/{util => }/allocator.h (100%) rename 3rdparty/flann/{algorithms => }/autotuned_index.h (100%) rename 3rdparty/flann/{util => }/common.h (100%) rename 3rdparty/flann/{algorithms => }/composite_index.h (100%) rename 3rdparty/flann/{algorithms => }/dist.cpp (100%) rename 3rdparty/flann/{algorithms => }/dist.h (100%) rename 3rdparty/flann/{nn => }/ground_truth.h (100%) rename 3rdparty/flann/{util => }/heap.h (100%) rename 3rdparty/flann/{nn => }/index_testing.cpp (100%) rename 3rdparty/flann/{nn => }/index_testing.h (100%) rename 3rdparty/flann/{algorithms => }/kdtree_index.h (100%) rename 3rdparty/flann/{algorithms => }/kmeans_index.h (100%) rename 3rdparty/flann/{algorithms => }/linear_index.h (100%) rename 3rdparty/flann/{util => }/logger.cpp (100%) rename 3rdparty/flann/{util => }/logger.h (100%) rename 3rdparty/flann/{util => }/matrix.h (100%) rename 3rdparty/flann/{algorithms => }/nn_index.h (100%) rename 3rdparty/flann/{util => }/object_factory.h (100%) rename 3rdparty/flann/{util => }/random.cpp (100%) rename 3rdparty/flann/{util => }/random.h (100%) rename 3rdparty/flann/{util => }/result_set.h (100%) rename 3rdparty/flann/{util => }/saving.cpp (100%) rename 3rdparty/flann/{util => }/saving.h (100%) rename 3rdparty/flann/{nn => }/simplex_downhill.h (100%) rename 3rdparty/flann/{util => }/timer.h (100%) diff --git a/3rdparty/flann/CMakeLists.txt b/3rdparty/flann/CMakeLists.txt index b4e735aaa..8e41fd4d4 100644 --- a/3rdparty/flann/CMakeLists.txt +++ b/3rdparty/flann/CMakeLists.txt @@ -12,22 +12,17 @@ project(flann) include_directories( ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_SOURCE_DIR}/algorithms - ${CMAKE_CURRENT_SOURCE_DIR}/util - ${CMAKE_CURRENT_SOURCE_DIR}/nn "${CMAKE_CURRENT_SOURCE_DIR}/../include/flann" ) # The .cpp files: -file(GLOB_RECURSE flann_sources_cpp *.cpp) -file(GLOB_RECURSE flann_sources_h1 "${CMAKE_CURRENT_SOURCE_DIR}/../include/flann/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/../include/flann/*.hpp") -file(GLOB_RECURSE flann_sources_h2 *.h *.hpp) +file(GLOB flann_sources *.cpp *.h *.hpp) +file(GLOB flann_h "${CMAKE_CURRENT_SOURCE_DIR}/../include/flann/*.h" "${CMAKE_CURRENT_SOURCE_DIR}/../include/flann/*.hpp") -source_group("Src" FILES ${flann_sources_cpp}) -source_group("Include\\External" FILES ${flann_sources_h1}) -source_group("Include\\Internal" FILES ${flann_sources_h2}) +source_group("Src" FILES ${flann_sources}) +source_group("Include" FILES ${flann_h}) -set(flann_sources ${flann_sources_cpp} ${flann_sources_h1} ${flann_sources_h2}) +set(flann_sources ${flann_sources} ${flann_h}) # ---------------------------------------------------------------------------------- # Define the library target: diff --git a/3rdparty/flann/util/allocator.h b/3rdparty/flann/allocator.h similarity index 100% rename from 3rdparty/flann/util/allocator.h rename to 3rdparty/flann/allocator.h diff --git a/3rdparty/flann/algorithms/autotuned_index.h b/3rdparty/flann/autotuned_index.h similarity index 100% rename from 3rdparty/flann/algorithms/autotuned_index.h rename to 3rdparty/flann/autotuned_index.h diff --git a/3rdparty/flann/util/common.h b/3rdparty/flann/common.h similarity index 100% rename from 3rdparty/flann/util/common.h rename to 3rdparty/flann/common.h diff --git a/3rdparty/flann/algorithms/composite_index.h b/3rdparty/flann/composite_index.h similarity index 100% rename from 3rdparty/flann/algorithms/composite_index.h rename to 3rdparty/flann/composite_index.h diff --git a/3rdparty/flann/algorithms/dist.cpp b/3rdparty/flann/dist.cpp similarity index 100% rename from 3rdparty/flann/algorithms/dist.cpp rename to 3rdparty/flann/dist.cpp diff --git a/3rdparty/flann/algorithms/dist.h b/3rdparty/flann/dist.h similarity index 100% rename from 3rdparty/flann/algorithms/dist.h rename to 3rdparty/flann/dist.h diff --git a/3rdparty/flann/nn/ground_truth.h b/3rdparty/flann/ground_truth.h similarity index 100% rename from 3rdparty/flann/nn/ground_truth.h rename to 3rdparty/flann/ground_truth.h diff --git a/3rdparty/flann/util/heap.h b/3rdparty/flann/heap.h similarity index 100% rename from 3rdparty/flann/util/heap.h rename to 3rdparty/flann/heap.h diff --git a/3rdparty/flann/nn/index_testing.cpp b/3rdparty/flann/index_testing.cpp similarity index 100% rename from 3rdparty/flann/nn/index_testing.cpp rename to 3rdparty/flann/index_testing.cpp diff --git a/3rdparty/flann/nn/index_testing.h b/3rdparty/flann/index_testing.h similarity index 100% rename from 3rdparty/flann/nn/index_testing.h rename to 3rdparty/flann/index_testing.h diff --git a/3rdparty/flann/algorithms/kdtree_index.h b/3rdparty/flann/kdtree_index.h similarity index 100% rename from 3rdparty/flann/algorithms/kdtree_index.h rename to 3rdparty/flann/kdtree_index.h diff --git a/3rdparty/flann/algorithms/kmeans_index.h b/3rdparty/flann/kmeans_index.h similarity index 100% rename from 3rdparty/flann/algorithms/kmeans_index.h rename to 3rdparty/flann/kmeans_index.h diff --git a/3rdparty/flann/algorithms/linear_index.h b/3rdparty/flann/linear_index.h similarity index 100% rename from 3rdparty/flann/algorithms/linear_index.h rename to 3rdparty/flann/linear_index.h diff --git a/3rdparty/flann/util/logger.cpp b/3rdparty/flann/logger.cpp similarity index 100% rename from 3rdparty/flann/util/logger.cpp rename to 3rdparty/flann/logger.cpp diff --git a/3rdparty/flann/util/logger.h b/3rdparty/flann/logger.h similarity index 100% rename from 3rdparty/flann/util/logger.h rename to 3rdparty/flann/logger.h diff --git a/3rdparty/flann/util/matrix.h b/3rdparty/flann/matrix.h similarity index 100% rename from 3rdparty/flann/util/matrix.h rename to 3rdparty/flann/matrix.h diff --git a/3rdparty/flann/algorithms/nn_index.h b/3rdparty/flann/nn_index.h similarity index 100% rename from 3rdparty/flann/algorithms/nn_index.h rename to 3rdparty/flann/nn_index.h diff --git a/3rdparty/flann/util/object_factory.h b/3rdparty/flann/object_factory.h similarity index 100% rename from 3rdparty/flann/util/object_factory.h rename to 3rdparty/flann/object_factory.h diff --git a/3rdparty/flann/util/random.cpp b/3rdparty/flann/random.cpp similarity index 100% rename from 3rdparty/flann/util/random.cpp rename to 3rdparty/flann/random.cpp diff --git a/3rdparty/flann/util/random.h b/3rdparty/flann/random.h similarity index 100% rename from 3rdparty/flann/util/random.h rename to 3rdparty/flann/random.h diff --git a/3rdparty/flann/util/result_set.h b/3rdparty/flann/result_set.h similarity index 100% rename from 3rdparty/flann/util/result_set.h rename to 3rdparty/flann/result_set.h diff --git a/3rdparty/flann/util/saving.cpp b/3rdparty/flann/saving.cpp similarity index 100% rename from 3rdparty/flann/util/saving.cpp rename to 3rdparty/flann/saving.cpp diff --git a/3rdparty/flann/util/saving.h b/3rdparty/flann/saving.h similarity index 100% rename from 3rdparty/flann/util/saving.h rename to 3rdparty/flann/saving.h diff --git a/3rdparty/flann/nn/simplex_downhill.h b/3rdparty/flann/simplex_downhill.h similarity index 100% rename from 3rdparty/flann/nn/simplex_downhill.h rename to 3rdparty/flann/simplex_downhill.h diff --git a/3rdparty/flann/util/timer.h b/3rdparty/flann/timer.h similarity index 100% rename from 3rdparty/flann/util/timer.h rename to 3rdparty/flann/timer.h diff --git a/3rdparty/zlib/gzguts.h b/3rdparty/zlib/gzguts.h index 0f8fb79f8..b69438794 100644 --- a/3rdparty/zlib/gzguts.h +++ b/3rdparty/zlib/gzguts.h @@ -19,7 +19,7 @@ #endif #include -#include "zlib.h" +#include "zutil.h" #ifdef STDC # include # include @@ -36,6 +36,10 @@ # define vsnprintf _vsnprintf #endif +#ifdef __GNUC__ +#include +#endif + #ifndef local # define local static #endif diff --git a/3rdparty/zlib/zutil.h b/3rdparty/zlib/zutil.h index 258fa8879..97a5f2a87 100644 --- a/3rdparty/zlib/zutil.h +++ b/3rdparty/zlib/zutil.h @@ -21,6 +21,13 @@ #include "zlib.h" +#ifdef __arm__ +# define z_off64_t z_off_t +#endif +#ifndef Z_TREES +#define Z_TREES 6 +#endif + #ifdef STDC # if !(defined(_WIN32_WCE) && defined(_MSC_VER)) # include