summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindMilesSDK.cmake34
-rw-r--r--cmake/FindSndFile.cmake9
-rw-r--r--cmake/Findmpg123.cmake2
-rw-r--r--cmake/Findopusfile.cmake3
4 files changed, 37 insertions, 11 deletions
diff --git a/cmake/FindMilesSDK.cmake b/cmake/FindMilesSDK.cmake
new file mode 100644
index 00000000..57da3a6e
--- /dev/null
+++ b/cmake/FindMilesSDK.cmake
@@ -0,0 +1,34 @@
+# - Find Miles SDK
+# Find the Miles SDK header + import library
+#
+# MilesSDK_INCLUDE_DIR - Where to find mss.h
+# MilesSDK_LIBRARIES - List of libraries when using MilesSDK.
+# MilesSDK_FOUND - True if Miles SDK found.
+# MilesSDK::MilesSDK - Imported library of Miles SDK
+
+find_path(MilesSDK_INCLUDE_DIR mss.h
+ PATHS "${MilesSDK_DIR}"
+ PATH_SUFFIXES include
+)
+
+if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ set(_miles_sdk_libname mss64)
+else()
+ set(_miles_sdk_libname mss32)
+endif()
+
+find_library(MilesSDK_LIBRARIES NAMES ${_miles_sdk_libname}
+ PATHS "${MilesSDK_DIR}"
+ PATH_SUFFIXES lib
+)
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(MilesSDK DEFAULT_MSG MilesSDK_LIBRARIES MilesSDK_INCLUDE_DIR)
+
+if(NOT TARGET MilesSDK::MilesSDK)
+ add_library(MilesSDK::MilesSDK UNKNOWN IMPORTED)
+ set_target_properties(MilesSDK::MilesSDK PROPERTIES
+ IMPORTED_LOCATION "${MilesSDK_LIBRARIES}
+ INTERFACE_INCLUDE_DIRECTORIES "${MilesSDK_INCLUDE_DIR}"
+ )
+endif()
diff --git a/cmake/FindSndFile.cmake b/cmake/FindSndFile.cmake
index f0e2883e..5381af48 100644
--- a/cmake/FindSndFile.cmake
+++ b/cmake/FindSndFile.cmake
@@ -51,13 +51,10 @@ set(SNDFILE_CFLAGS "${PKG_SNDFILE_CFLAGS_OTHER}" CACHE STRING "CFLAGS of libsndf
set(SNDFILE_INCLUDE_DIRS "${SNDFILE_INCLUDE_DIR}")
set(SNDFILE_LIBRARIES "${SNDFILE_LIBRARY}")
-if (SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
-set(SNDFILE_FOUND TRUE)
-endif (SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
-
+if(SNDFILE_INCLUDE_DIRS AND SNDFILE_LIBRARIES)
+ set(SNDFILE_FOUND TRUE)
+endif()
-# handle the QUIETLY and REQUIRED arguments and set SndFile_FOUND to TRUE if
-# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SndFile DEFAULT_MSG SNDFILE_INCLUDE_DIRS SNDFILE_LIBRARIES)
diff --git a/cmake/Findmpg123.cmake b/cmake/Findmpg123.cmake
index 365d65ff..c6fe56bb 100644
--- a/cmake/Findmpg123.cmake
+++ b/cmake/Findmpg123.cmake
@@ -26,8 +26,6 @@ find_library(mpg123_LIBRARIES NAMES mpg123 mpg123-0
set(mpg123_CFLAGS "${PKG_MPG123_CFLAGS_OTHER}" CACHE STRING "CFLAGS of mpg123")
-# 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)
diff --git a/cmake/Findopusfile.cmake b/cmake/Findopusfile.cmake
index 43d285eb..faae7645 100644
--- a/cmake/Findopusfile.cmake
+++ b/cmake/Findopusfile.cmake
@@ -52,9 +52,6 @@ if (OPUSFILE_INCLUDE_DIRS AND OPUSFILE_LIBRARIES)
set(OPUSFILE_FOUND TRUE)
endif (OPUSFILE_INCLUDE_DIRS AND OPUSFILE_LIBRARIES)
-
-# handle the QUIETLY and REQUIRED arguments and set Opusfile_FOUND to TRUE if
-# all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(opusfile DEFAULT_MSG OPUSFILE_INCLUDE_DIRS OPUSFILE_LIBRARIES)