1 #[=======================================================================[.rst:
5 Finds the fluidsynth library.
10 This will define the following variables:
13 True if the system has the fluidsynth library.
14 ``Fluidsynth_INCLUDE_DIRS``
15 Include directories needed to use fluidsynth.
16 ``Fluidsynth_LIBRARIES``
17 Libraries needed to link to fluidsynth.
18 ``Fluidsynth_VERSION``
19 The version of the fluidsynth library which was found.
24 The following cache variables may also be set:
26 ``Fluidsynth_INCLUDE_DIR``
27 The directory containing ``fluidsynth.h``.
28 ``Fluidsynth_LIBRARY``
29 The path to the fluidsynth library.
31 #]=======================================================================]
33 find_package(PkgConfig QUIET)
34 pkg_check_modules(PC_Fluidsynth QUIET fluidsynth)
36 find_path(Fluidsynth_INCLUDE_DIR
38 PATHS ${PC_Fluidsynth_INCLUDE_DIRS}
41 find_library(Fluidsynth_LIBRARY
43 PATHS ${PC_Fluidsynth_LIBRARY_DIRS}
46 set(Fluidsynth_VERSION ${PC_Fluidsynth_VERSION})
48 include(FindPackageHandleStandardArgs)
49 find_package_handle_standard_args(Fluidsynth
50 FOUND_VAR Fluidsynth_FOUND
53 Fluidsynth_INCLUDE_DIR
54 VERSION_VAR Fluidsynth_VERSION
58 set(Fluidsynth_LIBRARIES ${Fluidsynth_LIBRARY})
59 set(Fluidsynth_INCLUDE_DIRS ${Fluidsynth_INCLUDE_DIR})
63 Fluidsynth_INCLUDE_DIR