summaryrefslogtreecommitdiffstats
path: root/cmake/FindMPG123.cmake
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-10-31 23:14:28 +0100
committershfil <filip.gawin@zoho.com>2020-11-02 17:07:04 +0100
commit1df6dda546aa658d456846900880ac380d0ab677 (patch)
tree360be8ea099941f77a0f1490151a61fb2f3d6ff3 /cmake/FindMPG123.cmake
parentFix include in Frontend_PS2.cpp (diff)
downloadre3-1df6dda546aa658d456846900880ac380d0ab677.tar
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.gz
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.bz2
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.lz
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.xz
re3-1df6dda546aa658d456846900880ac380d0ab677.tar.zst
re3-1df6dda546aa658d456846900880ac380d0ab677.zip
Diffstat (limited to 'cmake/FindMPG123.cmake')
-rw-r--r--cmake/FindMPG123.cmake28
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/FindMPG123.cmake b/cmake/FindMPG123.cmake
new file mode 100644
index 00000000..a9b6dd8b
--- /dev/null
+++ b/cmake/FindMPG123.cmake
@@ -0,0 +1,28 @@
+# - Find mpg123
+# Find the native mpg123 includes and library
+#
+# MPG123_INCLUDE_DIR - where to find mpg123.h
+# MPG123_LIBRARIES - List of libraries when using mpg123.
+# MPG123_FOUND - True if mpg123 found.
+
+IF(MPG123_INCLUDE_DIR AND MPG123_LIBRARIES)
+ # Already in cache, be silent
+ SET(MPG123_FIND_QUIETLY TRUE)
+ENDIF(MPG123_INCLUDE_DIR AND MPG123_LIBRARIES)
+
+FIND_PATH(MPG123_INCLUDE_DIR mpg123.h
+ PATHS "${MPG123_DIR}"
+ PATH_SUFFIXES include
+ )
+
+FIND_LIBRARY(MPG123_LIBRARIES NAMES mpg123 mpg123-0
+ PATHS "${MPG123_DIR}"
+ PATH_SUFFIXES lib
+ )
+
+# MARK_AS_ADVANCED(MPG123_LIBRARIES MPG123_INCLUDE_DIR)
+
+# handle the QUIETLY and REQUIRED arguments and set MPG123_FOUND to TRUE if
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(MPG123 DEFAULT_MSG MPG123_LIBRARIES MPG123_INCLUDE_DIR)