File: FindFuzzyLite.cmake

package info (click to toggle)
vcmi 0.99%2Bdfsg%2Bgit20190113.f06c8a87-2
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 11,136 kB
  • sloc: cpp: 142,615; sh: 315; objc: 248; makefile: 32; ansic: 28; python: 13
file content (57 lines) | stat: -rw-r--r-- 1,389 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#.rst:
# FindFuzzylite
# --------
#
# Locate FuzzyLite library
#
#=============================================================================
# Copyright 2003-2009 Kitware, Inc.
# Copyright 2012 Benjamin Eikel
# Copyright 2014 Mikhail Paulyshka
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file kitware license.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
#  License text for the above reference.)

find_path(FL_INCLUDE_DIR 
    fl/fuzzylite.h
  HINTS
    ENV FLDIR
  PATH_SUFFIXES
    fl
    include/fl 
    include
)

if(CMAKE_SIZEOF_VOID_P EQUAL 8)
  set(VC_LIB_PATH_SUFFIX lib/x64)
else()
  set(VC_LIB_PATH_SUFFIX lib/x86)
endif()

find_library(FL_LIBRARY
  NAMES 
    fuzzylite
  HINTS
    ENV FLDIR
  PATH_SUFFIXES 
    dynamic
    lib
    ${VC_LIB_PATH_SUFFIX}
)

set(FL_LIBRARIES ${FL_LIBRARY})
set(FL_INCLUDE_DIRS ${FL_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)

FIND_PACKAGE_HANDLE_STANDARD_ARGS(FL
                                  REQUIRED_VARS FL_LIBRARIES FL_INCLUDE_DIRS)

mark_as_advanced(FL_LIBRARY FL_INCLUDE_DIR)