FindSVM.cmake 771 Bytes
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14
# - Try to find SVM
# Once done this will define
#  
#  SVM_FOUND        - system has SVM
#  SVM_INCLUDE_DIR  - the SVM include directory
#  SVM_LIBRARY      - Link these to use SVM
#   

IF (SVM_INCLUDE_DIRS)
  # Already in cache, be silent
  SET(SVM_FIND_QUIETLY TRUE)
ENDIF (SVM_INCLUDE_DIRS)

FIND_PATH( SVM_INCLUDE_DIR libsvm/svm.h
15
           PATHS /usr/include/libsvm-2.0
16
                 /usr/include/libsvm-3.0
David Bommes's avatar
David Bommes committed
17 18
                 /usr/include
                 /opt/local/include )
19

Jan Möbius's avatar
Jan Möbius committed
20

Jan Möbius's avatar
Jan Möbius committed
21 22
FIND_LIBRARY( SVM_LIBRARY
              NAMES svm
23
              PATHS /lib /usr/lib /usr/local/lib /opt/local/lib )
Jan Möbius's avatar
Jan Möbius committed
24 25 26 27 28 29 30 31


IF (SVM_INCLUDE_DIR AND SVM_LIBRARY)
  SET(SVM_FOUND TRUE)
ELSE (SVM_INCLUDE_DIR AND SVM_LIBRARY)
  SET( SVM_FOUND FALSE )
ENDIF (SVM_INCLUDE_DIR AND SVM_LIBRARY)