mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
fixed flann for linux
This commit is contained in:
parent
0e898fe892
commit
7419fc975c
@ -1,3 +1,3 @@
|
||||
Source: flann
|
||||
Version: 1.9.1-8
|
||||
Version: 1.9.1-9
|
||||
Description: Fast Library for Approximate Nearest Neighbors
|
||||
|
@ -1,41 +0,0 @@
|
||||
diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
|
||||
index cc58c90..49c53f0 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 ${C_SOURCES})
|
||||
+ add_library(flann SHARED ${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
|
||||
+ TARGETS flann flann_s
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${FLANN_LIB_INSTALL_DIR}
|
@ -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}
|
22
ports/flann/flann-linux.patch
Normal file
22
ports/flann/flann-linux.patch
Normal file
@ -0,0 +1,22 @@
|
||||
diff --git a/src/cpp/CMakeLists b/src/cpp/CMakeLists.txt
|
||||
index e6c8ae06..c15a8e90 100644
|
||||
--- a/src/cpp/CMakeLists.txt
|
||||
+++ b/src/cpp/CMakeLists.txt
|
||||
@@ -35,7 +35,7 @@ if (BUILD_CUDA_LIB)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
|
||||
- add_library(flann_cpp SHARED "")
|
||||
+ add_library(flann_cpp SHARED ${CPP_SOURCES})
|
||||
set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive)
|
||||
|
||||
@@ -90,7 +90,7 @@ if (BUILD_C_BINDINGS)
|
||||
set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC)
|
||||
- add_library(flann SHARED "")
|
||||
+ add_library(flann SHARED ${C_SOURCES})
|
||||
set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX)
|
||||
target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive)
|
||||
else()
|
@ -7,10 +7,9 @@ vcpkg_from_github(
|
||||
SHA512 0da78bb14111013318160dd3dee1f93eb6ed077b18439fd6496017b62a8a6070cc859cfb3e08dad4c614e48d9dc1da5f7c4a21726ee45896d360506da074a6f7
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-install-flann.patch
|
||||
Revert-fix-install-flann.patch
|
||||
export-all-symbols-of-flann-cpp.patch
|
||||
no-write-src-dir.patch
|
||||
flann-linux.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -18,6 +17,7 @@ vcpkg_configure_cmake(
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
-DBUILD_TESTS=OFF
|
||||
-DBUILD_DOC=OFF
|
||||
-DBUILD_PYTHON_BINDINGS=OFF
|
||||
-DBUILD_MATLAB_BINDINGS=OFF
|
||||
|
Loading…
x
Reference in New Issue
Block a user