Revert previous patch rather than deleting it.

This commit is contained in:
Sean Li 2017-06-17 12:09:44 +08:00
parent 47909aff3e
commit 5c5affcc29
3 changed files with 86 additions and 1 deletions

View File

@ -0,0 +1,41 @@
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}

View File

@ -0,0 +1,41 @@
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}

View File

@ -21,7 +21,10 @@ vcpkg_from_github(
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/export-all-symbols-of-flann-cpp.patch"
PATCHES
${CMAKE_CURRENT_LIST_DIR}/fix-install-flann.patch
${CMAKE_CURRENT_LIST_DIR}/Revert-fix-install-flann.patch
${CMAKE_CURRENT_LIST_DIR}/export-all-symbols-of-flann-cpp.patch
)
vcpkg_configure_cmake(