diff options
Diffstat (limited to 'cmake/check_mysql.cmake')
-rw-r--r-- | cmake/check_mysql.cmake | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/cmake/check_mysql.cmake b/cmake/check_mysql.cmake new file mode 100644 index 000000000..5aa19fbe6 --- /dev/null +++ b/cmake/check_mysql.cmake @@ -0,0 +1,13 @@ +# Copyright 2022 The Mumble Developers. All rights reserved. +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file at the root of the +# Mumble source tree or at <https://www.mumble.info/LICENSE>. + +function(check_mysql_connectivity) + set(options REQUIRED) + set(oneValueArgs USERNAME PASSWORD) + set(multiValueArgs "") + cmake_parse_arguments(MYSQL_CONNECTIVITY "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) + + find_program(MYSQL_CLI "mysql" MYSQL_CONNECTIVITY_REQUIRED) +endfunction() |