Fix find debug library of FLANN

Fix find debug library of FLANN.
Currently, QHull port generates debug libraries with DEBUG_POSTFIX
(-gd).
Therefore, It doesn't need to be override.
This commit is contained in:
Tsukasa Sugiura 2017-11-15 10:22:43 +09:00
parent 1c43dfa4a2
commit 0e4daf35ba
2 changed files with 11 additions and 2 deletions

View File

@ -16,7 +16,7 @@ index f4ef6a0ff..3a2c259dc 100644
PATHS "$ENV{PROGRAMFILES}/flann 1.6.9" "$ENV{PROGRAMW6432}/flann 1.6.9"
"$ENV{PROGRAMFILES}/flann" "$ENV{PROGRAMW6432}/flann"
- PATH_SUFFIXES lib)
+ PATH_SUFFIXES debug/lib)
+ PATH_SUFFIXES lib debug/lib)
find_package_handle_standard_args(Flann DEFAULT_MSG FLANN_LIBRARY FLANN_INCLUDE_DIRS)
if(FLANN_FOUND)

View File

@ -1,5 +1,5 @@
diff --git a/cmake/Modules/FindFLANN.cmake b/cmake/Modules/FindFLANN.cmake
index b5739dc95..4041a2539 100644
index b5739dc95..d2c3fd07e 100644
--- a/cmake/Modules/FindFLANN.cmake
+++ b/cmake/Modules/FindFLANN.cmake
@@ -10,8 +10,8 @@
@ -13,3 +13,12 @@ index b5739dc95..4041a2539 100644
else(FLANN_USE_STATIC)
set(FLANN_RELEASE_NAME flann_cpp)
set(FLANN_DEBUG_NAME flann_cpp-gd)
@@ -41,7 +41,7 @@ find_library(FLANN_LIBRARY_DEBUG
NAMES ${FLANN_DEBUG_NAME} ${FLANN_RELEASE_NAME}
HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS} "${FLANN_ROOT}" "$ENV{FLANN_ROOT}"
PATHS "$ENV{PROGRAMFILES}/Flann" "$ENV{PROGRAMW6432}/Flann"
- PATH_SUFFIXES lib)
+ PATH_SUFFIXES lib debug/lib)
if(NOT FLANN_LIBRARY_DEBUG)
set(FLANN_LIBRARY_DEBUG ${FLANN_LIBRARY})