FindFuzzylite.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #.rst:
  2. # FindFuzzylite
  3. # --------
  4. #
  5. # Locate Fuzzylite library
  6. #
  7. #=============================================================================
  8. # Copyright 2003-2009 Kitware, Inc.
  9. # Copyright 2012 Benjamin Eikel
  10. # Copyright 2014 Mikhail Paulyshka
  11. #
  12. # Distributed under the OSI-approved BSD License (the "License");
  13. # see accompanying file kitware license.txt for details.
  14. #
  15. # This software is distributed WITHOUT ANY WARRANTY; without even the
  16. # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  17. # See the License for more information.
  18. #=============================================================================
  19. # (To distribute this file outside of CMake, substitute the full
  20. # License text for the above reference.)
  21. find_path(FL_INCLUDE_DIR
  22. fl/fuzzylite.h
  23. HINTS
  24. ENV FLDIR
  25. PATH_SUFFIXES
  26. fl
  27. include/fl
  28. include
  29. )
  30. if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  31. set(VC_LIB_PATH_SUFFIX lib/x64)
  32. else()
  33. set(VC_LIB_PATH_SUFFIX lib/x86)
  34. endif()
  35. find_library(FL_LIBRARY
  36. NAMES
  37. fuzzylite
  38. HINTS
  39. ENV FLDIR
  40. PATH_SUFFIXES
  41. dynamic
  42. lib
  43. ${VC_LIB_PATH_SUFFIX}
  44. )
  45. set(FL_LIBRARIES ${FL_LIBRARY})
  46. set(FL_INCLUDE_DIRS ${FL_INCLUDE_DIR})
  47. include(FindPackageHandleStandardArgs)
  48. FIND_PACKAGE_HANDLE_STANDARD_ARGS(FL
  49. REQUIRED_VARS FL_LIBRARIES FL_INCLUDE_DIRS)
  50. mark_as_advanced(FL_LIBRARY FL_INCLUDE_DIR)