diff options
author | Anonymous Maarten <anonymous.maarten@gmail.com> | 2021-01-03 16:30:45 +0100 |
---|---|---|
committer | shfil <filip.gawin@zoho.com> | 2021-01-11 11:24:25 +0100 |
commit | e9adfd86636af27b98a314f3f42a0d3312063732 (patch) | |
tree | 4b1185a7e3bbb519b8cbff8e47eb816366d26fe0 /cmake/FindMilesSDK.cmake | |
parent | cmake: use openal/opusfile/mpg123/libsndfile correctly (diff) | |
download | re3-e9adfd86636af27b98a314f3f42a0d3312063732.tar re3-e9adfd86636af27b98a314f3f42a0d3312063732.tar.gz re3-e9adfd86636af27b98a314f3f42a0d3312063732.tar.bz2 re3-e9adfd86636af27b98a314f3f42a0d3312063732.tar.lz re3-e9adfd86636af27b98a314f3f42a0d3312063732.tar.xz re3-e9adfd86636af27b98a314f3f42a0d3312063732.tar.zst re3-e9adfd86636af27b98a314f3f42a0d3312063732.zip |
Diffstat (limited to 'cmake/FindMilesSDK.cmake')
-rw-r--r-- | cmake/FindMilesSDK.cmake | 34 |
1 files changed, 34 insertions, 0 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() |