Various fixes around Companion trainer mode (#7116)
[opentx.git] / cmake / FindFox.cmake
blob1100c710d79d515a7da623fcca05d19b10aadf80
1 # Imported from the DeskVox project (LPGL 2.1)
3 include(FindPackageHandleStandardArgs)
5 set(hints
6   $ENV{LIB_BASE_PATH}/fox
9 set(paths
10   /usr
11   /usr/local
14 find_path(FOX_INCLUDE_DIR
15   NAMES
16     fx.h
17   HINTS
18     ${hints}
19   PATHS
20     ${paths}
21   PATH_SUFFIXES
22     include
23     include/fox
24     include/fox-1.6
27 find_library(FOX_LIBRARY
28   NAMES
29     FOX-1.6
30     fox-1.6
31   HINTS
32     ${hints}
33   PATHS
34     ${paths}
35   PATH_SUFFIXES
36     lib64
37     lib
40 find_library(FOX_LIBRARY_DEBUG
41   NAMES
42     FOXD-1.6
43     foxd-1.6
44   HINTS
45     ${hints}
46   PATHS
47     ${paths}
48   PATH_SUFFIXES
49     lib64
50     lib
53 if(FOX_LIBRARY_DEBUG)
54   set(FOX_LIBRARIES optimized ${FOX_LIBRARY} debug ${FOX_LIBRARY_DEBUG})
55 else()
56   set(FOX_LIBRARIES ${FOX_LIBRARY})
57 endif()
59 find_package_handle_standard_args(FOX
60   DEFAULT_MSG
61   FOX_INCLUDE_DIR
62   FOX_LIBRARY