aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-11-28 03:03:16 -0800
committerChris Robinson <[email protected]>2013-11-28 03:08:28 -0800
commita3c76c32740248a54827696b87841c6381ee8550 (patch)
tree0e2d690c2a1a36b467d4fd9a2ce95c26cf6a267b /cmake
parenta48f362d282401ddefe742188bd13a59fc79835e (diff)
Add an option for FLuidSynth to handle MIDI
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindFluidSynth.cmake23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmake/FindFluidSynth.cmake b/cmake/FindFluidSynth.cmake
new file mode 100644
index 00000000..7d5cb6a8
--- /dev/null
+++ b/cmake/FindFluidSynth.cmake
@@ -0,0 +1,23 @@
+# - Find fluidsynth
+# Find the native fluidsynth includes and library
+#
+# FLUIDSYNTH_INCLUDE_DIR - where to find fluidsynth.h
+# FLUIDSYNTH_LIBRARIES - List of libraries when using fluidsynth.
+# FLUIDSYNTH_FOUND - True if fluidsynth found.
+
+
+IF (FLUIDSYNTH_INCLUDE_DIR AND FLUIDSYNTH_LIBRARIES)
+ # Already in cache, be silent
+ SET(FluidSynth_FIND_QUIETLY TRUE)
+ENDIF (FLUIDSYNTH_INCLUDE_DIR AND FLUIDSYNTH_LIBRARIES)
+
+FIND_PATH(FLUIDSYNTH_INCLUDE_DIR fluidsynth.h)
+
+FIND_LIBRARY(FLUIDSYNTH_LIBRARIES NAMES fluidsynth )
+MARK_AS_ADVANCED( FLUIDSYNTH_LIBRARIES FLUIDSYNTH_INCLUDE_DIR )
+
+# handle the QUIETLY and REQUIRED arguments and set FLUIDSYNTH_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(FluidSynth DEFAULT_MSG FLUIDSYNTH_LIBRARIES FLUIDSYNTH_INCLUDE_DIR)
+