diff options
author | sanine <sanine.not@pm.me> | 2022-08-25 14:54:53 -0500 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-08-25 14:54:53 -0500 |
commit | 37c97e345d12f95dde44e1d1a4c2f2aadd4615bc (patch) | |
tree | e1bb25bc855883062bdd7847ff2c04290f71c840 /portaudio/cmake_support/FindASIOSDK.cmake | |
parent | 5634c7b04da619669f2f29f6798c03982be05180 (diff) |
add initial structure
Diffstat (limited to 'portaudio/cmake_support/FindASIOSDK.cmake')
-rw-r--r-- | portaudio/cmake_support/FindASIOSDK.cmake | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/portaudio/cmake_support/FindASIOSDK.cmake b/portaudio/cmake_support/FindASIOSDK.cmake new file mode 100644 index 0000000..55ad33d --- /dev/null +++ b/portaudio/cmake_support/FindASIOSDK.cmake @@ -0,0 +1,41 @@ +# $Id: $ +# +# - Try to find the ASIO SDK +# Once done this will define +# +# ASIOSDK_FOUND - system has ASIO SDK +# ASIOSDK_ROOT_DIR - path to the ASIO SDK base directory +# ASIOSDK_INCLUDE_DIR - the ASIO SDK include directory + +if(WIN32) +else(WIN32) + message(FATAL_ERROR "FindASIOSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" ) +endif(WIN32) + +file(GLOB results "${CMAKE_CURRENT_SOURCE_DIR}/../as*") +foreach(f ${results}) + if(IS_DIRECTORY ${f}) + set(ASIOSDK_PATH_HINT ${ASIOSDK_PATH_HINT} ${f}) + endif() +endforeach() + +find_path(ASIOSDK_ROOT_DIR + common/asio.h + HINTS + ${ASIOSDK_PATH_HINT} +) + +find_path(ASIOSDK_INCLUDE_DIR + asio.h + PATHS + ${ASIOSDK_ROOT_DIR}/common +) + +# handle the QUIETLY and REQUIRED arguments and set ASIOSDK_FOUND to TRUE if +# all listed variables are TRUE +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(ASIOSDK DEFAULT_MSG ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR) + +MARK_AS_ADVANCED( + ASIOSDK_ROOT_DIR ASIOSDK_INCLUDE_DIR +) |