Commit 9e2e875e authored by Jan Möbius's avatar Jan Möbius

Added FLANN finder

Updated Eigen3 Finder
Updated SUITESPARSE Finder



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18226 383ad7c9-94d9-4d36-a494-682f7c89f535
parent bef21071
...@@ -16,6 +16,7 @@ find_path( EIGEN3_INCLUDE_DIR ...@@ -16,6 +16,7 @@ find_path( EIGEN3_INCLUDE_DIR
/usr/local/include /usr/local/include
/usr/local/include/eigen3/ /usr/local/include/eigen3/
/opt/local/include/eigen3/ /opt/local/include/eigen3/
"c:\\libs\\Eigen-3.2\\include"
"c:\\libs\\eigen3\\include" "c:\\libs\\eigen3\\include"
"c:\\libs\\eigen\\include" "c:\\libs\\eigen\\include"
${PROJECT_SOURCE_DIR}/MacOS/Libs/eigen3/include ${PROJECT_SOURCE_DIR}/MacOS/Libs/eigen3/include
......
###############################################################################
# Find Flann
#
# This sets the following variables:
# FLANN_FOUND - True if FLANN was found.
# FLANN_INCLUDE_DIRS - Directories containing the FLANN include files.
# FLANN_LIBRARIES - Libraries needed to use FLANN.
# FLANN_DEFINITIONS - Compiler flags for FLANN.
find_package(PkgConfig)
pkg_check_modules(PC_FLANN flann)
set(FLANN_DEFINITIONS ${PC_FLANN_CFLAGS_OTHER})
FIND_PATH (OPENMESH_INCLUDE_DIR OpenMesh/Core/Mesh/PolyMeshT.hh
PATH_SUFFIXES include)
find_path(FLANN_INCLUDE_DIR flann/flann.hpp
HINTS ${PC_FLANN_INCLUDEDIR} ${PC_FLANN_INCLUDE_DIRS})
find_library(FLANN_LIBRARY flann
PATHS ${SEARCH_PATHS}
HINTS ${PC_FLANN_LIBDIR} ${PC_FLANN_LIBRARY_DIRS})
set(FLANN_INCLUDE_DIRS ${FLANN_INCLUDE_DIR})
set(FLANN_LIBRARIES ${FLANN_LIBRARY})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Flann DEFAULT_MSG
FLANN_LIBRARY FLANN_INCLUDE_DIR)
mark_as_advanced(FLANN_LIBRARY FLANN_INCLUDE_DIR)
...@@ -18,8 +18,22 @@ ENDIF (SUITESPARSE_INCLUDE_DIRS) ...@@ -18,8 +18,22 @@ ENDIF (SUITESPARSE_INCLUDE_DIRS)
if( WIN32 ) if( WIN32 )
# Find cholmod part of the suitesparse library collection # Find cholmod part of the suitesparse library collection
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2013/x32/")
endif()
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS "C:\\libs\\win32\\SuiteSparse\\Include" ) PATHS "C:\\libs\\win32\\SuiteSparse\\Include"
"${VS_SEARCH_PATH}"
PATH_SUFFIXES suitesparse-4.2.1/include/suitesparse
)
# Add cholmod include directory to collection include directories # Add cholmod include directory to collection include directories
IF ( CHOLMOD_INCLUDE_DIR ) IF ( CHOLMOD_INCLUDE_DIR )
...@@ -30,7 +44,9 @@ if( WIN32 ) ...@@ -30,7 +44,9 @@ if( WIN32 )
# find path suitesparse library # find path suitesparse library
FIND_PATH( SUITESPARSE_LIBRARY_DIRS FIND_PATH( SUITESPARSE_LIBRARY_DIRS
amd.lib amd.lib
PATHS "C:\\libs\\win32\\SuiteSparse\\libs" ) PATHS "C:\\libs\\win32\\SuiteSparse\\libs"
"${VS_SEARCH_PATH}"
PATH_SUFFIXES suitesparse-4.2.1/lib64 )
# if we found the library, add it to the defined libraries # if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIRS ) IF ( SUITESPARSE_LIBRARY_DIRS )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment