mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-28 14:09:01 +08:00
flann: Add compilation of dll and flann_cpp.
This commit is contained in:
parent
c966c3709e
commit
e8b8792691
@ -1,3 +1,3 @@
|
||||
Source: flann
|
||||
Version: 1.9.1
|
||||
Description: performing fast approximate nearest neighbor searches in high dimensional spaces
|
||||
Description: Fast Library for Approximate Nearest Neighbors
|
||||
|
@ -1,41 +0,0 @@
|
||||
diff --git "a/src/cpp/CMakeLists.txt" "b/src/cpp/CMakeLists.txt"
|
||||
index 49c53f0..cc58c90 100644
|
||||
--- "a/src/cpp/CMakeLists.txt"
|
||||
+++ "b/src/cpp/CMakeLists.txt"
|
||||
@@ -87,7 +87,7 @@ if (BUILD_C_BINDINGS)
|
||||
set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
|
||||
else()
|
||||
- add_library(flann SHARED ${C_SOURCES})
|
||||
+ add_library(flann ${C_SOURCES})
|
||||
|
||||
if(MINGW AND OPENMP_FOUND)
|
||||
target_link_libraries(flann gomp)
|
||||
@@ -111,12 +111,12 @@ endif()
|
||||
endif(WIN32)
|
||||
|
||||
|
||||
-install (
|
||||
- TARGETS flann_cpp flann_cpp_s
|
||||
- RUNTIME DESTINATION bin
|
||||
- LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
||||
- ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
||||
-)
|
||||
+#install (
|
||||
+# TARGETS flann_cpp flann_cpp_s
|
||||
+# RUNTIME DESTINATION bin
|
||||
+# LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
||||
+# ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
||||
+#)
|
||||
|
||||
if (BUILD_CUDA_LIB)
|
||||
install (
|
||||
@@ -129,7 +129,7 @@ endif()
|
||||
|
||||
if (BUILD_C_BINDINGS)
|
||||
install (
|
||||
- TARGETS flann flann_s
|
||||
+ TARGETS flann
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
@ -11,41 +11,24 @@
|
||||
#
|
||||
|
||||
include(vcpkg_common_functions)
|
||||
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO mariusmuja/flann
|
||||
REF 1.9.1
|
||||
SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES "${CMAKE_CURRENT_LIST_DIR}/fix-install-flann.patch"
|
||||
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/flann-1.9.1)
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://github.com/mariusmuja/flann/archive/1.9.1.zip"
|
||||
FILENAME "flann-1.9.1.zip"
|
||||
SHA512 d2f5c13535a179800602dc8a94ee91da23b01f71bc893facdf91ab18a73c5738604cda9870f38c3797af75ded47c808b1d95d3bde707af814e1eb1388b56bb95
|
||||
)
|
||||
vcpkg_extract_source_archive(${ARCHIVE})
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
#PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_PYTHON_BINDINGS=OFF
|
||||
-DBUILD_MATLAB_BINDINGS=OFF
|
||||
-DBUILD_DOC=OFF
|
||||
|
||||
OPTIONS_RELEASE
|
||||
-DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib
|
||||
|
||||
OPTIONS_DEBUG
|
||||
-DFLANN_LIB_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib
|
||||
|
||||
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||
OPTIONS -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DBUILD_EXAMPLES=OFF -DBUILD_DOC=OFF -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_MATLAB_BINDINGS=OFF
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
||||
#clean
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
|
||||
# Handle copyright
|
||||
file(COPY ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/README.md ${CURRENT_PACKAGES_DIR}/share/flann/copyright)
|
||||
file(COPY ${CURRENT_BUILDTREES_DIR}/src/flann-1.9.1/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/flann)
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/share/flann/COPYING ${CURRENT_PACKAGES_DIR}/share/flann/copyright)
|
||||
|
Loading…
Reference in New Issue
Block a user