-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master' into migrate/ogre
- Loading branch information
Showing
218 changed files
with
3,743 additions
and
621 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ waitlist_users: | |
- NeXuS4Developer | ||
- sabapathim | ||
- pixelsoba | ||
- liss-h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(ANN LANGUAGES CXX) | ||
|
||
include(GNUInstallDirs) | ||
|
||
file(GLOB ANN_SRC_FILES ${ANN_SRC_DIR}/src/*.cpp) | ||
|
||
add_library(ANN ${ANN_SRC_FILES}) | ||
target_include_directories(ANN PUBLIC ${ANN_SRC_DIR}/include) | ||
|
||
if(WIN32) | ||
if(BUILD_SHARED_LIBS) | ||
set_target_properties(ANN PROPERTIES | ||
CXX_VISIBILITY_PRESET hidden | ||
VISIBILITY_INLINES_HIDDEN TRUE | ||
) | ||
target_compile_definitions(ANN PRIVATE DLL_EXPORTS) | ||
else() | ||
target_compile_definitions(ANN PUBLIC ANN_STATIC) | ||
endif() | ||
endif() | ||
|
||
install(DIRECTORY ${ANN_SRC_DIR}/include/ANN DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
install( | ||
TARGETS ANN | ||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
sources: | ||
"1.1.2": | ||
url: "https://www.cs.umd.edu/~mount/ANN/Files/1.1.2/ann_1.1.2.tar.gz" | ||
sha256: "eea03f2e224b66813226d775053316675375dcec45bd263674c052d9324a49a5" | ||
patches: | ||
"1.1.2": | ||
- patch_file: "patches/1.1.2-0001-fix-windows-static.patch" | ||
patch_description: "Fix windows static" | ||
patch_type: "portability" | ||
- patch_file: "patches/1.1.2-0002-fix-cppstd17+-register-keyword.patch" | ||
patch_description: "Fix compilation with C++17 (or above) standard, by removing register keyword" | ||
patch_type: "portability" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
from conan import ConanFile | ||
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout | ||
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get | ||
import os | ||
|
||
required_conan_version = ">=1.53.0" | ||
|
||
|
||
class AnnConan(ConanFile): | ||
name = "ann" | ||
description = ( | ||
"ANN is a library written in C++, which supports data structures and " | ||
"algorithms for both exact and approximate nearest neighbor searching " | ||
"in arbitrarily high dimensions." | ||
) | ||
license = "LGPL-2.1-or-later" | ||
url = "https://github.com/conan-io/conan-center-index" | ||
homepage = "https://www.cs.umd.edu/~mount/ANN" | ||
topics = ("nns", "nearest-neighbor-search") | ||
package_type = "library" | ||
settings = "os", "arch", "compiler", "build_type" | ||
options = { | ||
"shared": [True, False], | ||
"fPIC": [True, False], | ||
} | ||
default_options = { | ||
"shared": False, | ||
"fPIC": True, | ||
} | ||
|
||
def export_sources(self): | ||
copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder) | ||
export_conandata_patches(self) | ||
|
||
def config_options(self): | ||
if self.settings.os == "Windows": | ||
del self.options.fPIC | ||
|
||
def configure(self): | ||
if self.options.shared: | ||
self.options.rm_safe("fPIC") | ||
|
||
def layout(self): | ||
cmake_layout(self, src_folder="src") | ||
|
||
def source(self): | ||
get(self, **self.conan_data["sources"][self.version], strip_root=True) | ||
|
||
def generate(self): | ||
tc = CMakeToolchain(self) | ||
tc.variables["ANN_SRC_DIR"] = self.source_folder.replace("\\", "/") | ||
tc.generate() | ||
|
||
def build(self): | ||
apply_conandata_patches(self) | ||
cmake = CMake(self) | ||
cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir)) | ||
cmake.build() | ||
|
||
def package(self): | ||
for license_file in ("Copyright.txt", "License.txt"): | ||
copy(self, license_file, src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) | ||
cmake = CMake(self) | ||
cmake.install() | ||
|
||
def package_info(self): | ||
self.cpp_info.libs = ["ANN"] | ||
if self.settings.os == "Windows" and not self.options.shared: | ||
self.cpp_info.defines.append("ANN_STATIC") | ||
if self.settings.os in ["Linux", "FreeBSD"]: | ||
self.cpp_info.system_libs.append("m") |
11 changes: 11 additions & 0 deletions
11
recipes/ann/all/patches/1.1.2-0001-fix-windows-static.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- a/include/ANN/ANN.h | ||
+++ b/include/ANN/ANN.h | ||
@@ -59,7 +59,7 @@ | ||
#ifndef ANN_H | ||
#define ANN_H | ||
|
||
-#ifdef WIN32 | ||
+#if defined(_WIN32) && !defined(ANN_STATIC) | ||
//---------------------------------------------------------------------- | ||
// For Microsoft Visual C++, externally accessible symbols must be | ||
// explicitly indicated with DLL_API, which is somewhat like "extern." |
Oops, something went wrong.