Add WINDOWS_EXPORT_ALL_SYMBOLS property to flann_cpp only.

This commit is contained in:
Sean Li 2017-06-16 22:23:37 +08:00
parent c626675abb
commit 45cc143b26
3 changed files with 23 additions and 2 deletions

View File

@ -1,3 +1,3 @@
Source: flann
Version: 1.9.1
Version: 1.9.1-1
Description: Fast Library for Approximate Nearest Neighbors

View File

@ -0,0 +1,12 @@
diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
index 49c53f0..b9cf76b 100644
--- a/src/cpp/CMakeLists.txt
+++ b/src/cpp/CMakeLists.txt
@@ -52,6 +52,7 @@ set_target_properties(flann_cpp PROPERTIES
VERSION ${FLANN_VERSION}
SOVERSION ${FLANN_SOVERSION}
DEFINE_SYMBOL FLANN_EXPORTS
+ WINDOWS_EXPORT_ALL_SYMBOLS ON
)
if (BUILD_CUDA_LIB)

View File

@ -19,10 +19,19 @@ vcpkg_download_distfile(ARCHIVE
)
vcpkg_extract_source_archive(${ARCHIVE})
vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES "${CMAKE_CURRENT_LIST_DIR}/export-all-symbols-of-flann-cpp.patch"
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
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
OPTIONS
-DBUILD_EXAMPLES=OFF
-DBUILD_DOC=OFF
-DBUILD_PYTHON_BINDINGS=OFF
-DBUILD_MATLAB_BINDINGS=OFF
)
vcpkg_install_cmake()