diff options
author | Chris Robinson <[email protected]> | 2014-04-19 06:35:14 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-19 06:35:14 -0700 |
commit | 887763e41c953b91105bba119da7a7265815f5e0 (patch) | |
tree | 8443332ee06bf28e78fe5e34baf66e55b18b42a5 /cmake/FindQSA.cmake | |
parent | 1d266aa8347fadfb0db34ae27df7b728c0ab2171 (diff) |
Use find cmake modules for more backends
Diffstat (limited to 'cmake/FindQSA.cmake')
-rw-r--r-- | cmake/FindQSA.cmake | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/cmake/FindQSA.cmake b/cmake/FindQSA.cmake new file mode 100644 index 00000000..0ad1fd43 --- /dev/null +++ b/cmake/FindQSA.cmake @@ -0,0 +1,34 @@ +# - Find QSA includes and libraries +# +# QSA_FOUND - True if QSA_INCLUDE_DIR & QSA_LIBRARY are found +# QSA_LIBRARIES - Set when QSA_LIBRARY is found +# QSA_INCLUDE_DIRS - Set when QSA_INCLUDE_DIR is found +# +# QSA_INCLUDE_DIR - where to find sys/asoundlib.h, etc. +# QSA_LIBRARY - the asound library +# + +# Only check for QSA on QNX, because it conflicts with ALSA. +if("${CMAKE_C_PLATFORM_ID}" STREQUAL "QNX") + find_path(QSA_INCLUDE_DIR + NAMES sys/asoundlib.h + DOC "The QSA include directory" + ) + + find_library(QSA_LIBRARY + NAMES asound + DOC "The QSA library" + ) +endif() + +include(FindPackageHandleStandardArgs) +find_package_handle_standard_args(QSA + REQUIRED_VARS QSA_LIBRARY QSA_INCLUDE_DIR +) + +if(QSA_FOUND) + set(QSA_LIBRARIES ${QSA_LIBRARY}) + set(QSA_INCLUDE_DIRS ${QSA_INCLUDE_DIR}) +endif() + +mark_as_advanced(QSA_INCLUDE_DIR QSA_LIBRARY) |