Blame view

cmake/modules/FindCppFit.cmake 871 Bytes
fbe3c2bb   Benjamin Renard   First commit
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
# - Try to find CppFit
# Once done this will define
#  CPPFITFOUND - System has CppFit
#  CPPFITINCLUDE_DIRS - The CppFit include directories
#  CPPFITLIBRARIES - The libraries needed to use CppFit
#  CPPFITDEFINITIONS - Compiler switches required for using CppFit

#include(LibFindMacros)

find_path(CPPFITINCLUDE_DIR Fit/Fit.h
    HINTS
        $ENV{CPPFIT_ROOT}/include
        ${CPPFIT_ROOT}/include
)
mark_as_advanced(CPPFITINCLUDE_DIR)

find_library(CPPFITLIBRARY 
    NAMES CppFit
    HINTS
        $ENV{CPPFIT_ROOT}
        ${CPPFIT_ROOT}
    PATH_SUFFIXES lib
)
mark_as_advanced(CPPFITLIBRARY)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CppFit DEFAULT_MSG CPPFITLIBRARY CPPFITINCLUDE_DIR)

if(CPPFIT_FOUND)
    set(CPPFITINCLUDE_DIRS ${CPPFITINCLUDE_DIR})
    set(CPPFITLIBRARIES ${CPPFITLIBRARY})
endif()

#libfind_process(CppFit)