Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
VTK
VTK
Commits
e0c127e3
Commit
e0c127e3
authored
Oct 11, 2019
by
Ben Boeckel
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FindMySQL: support finding libmariadb as well
parent
d444f01d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
18 deletions
+23
-18
CMake/FindMySQL.cmake
CMake/FindMySQL.cmake
+23
-18
No files found.
CMake/FindMySQL.cmake
View file @
e0c127e3
...
...
@@ -16,26 +16,31 @@ if (NOT WIN32)
endif
()
if
(
_MySQL_use_pkgconfig
)
pkg_check_modules
(
_mariadb
"mariadb"
QUIET IMPORTED_TARGET
)
pkg_check_modules
(
_
lib
mariadb
"
lib
mariadb"
QUIET IMPORTED_TARGET
)
unset
(
_mysql_target
)
if
(
NOT _mariadb_FOUND
)
pkg_check_modules
(
_mysql
"mysql"
QUIET IMPORTED_TARGET
)
if
(
_mysql_FOUND
)
set
(
_mysql_target
"_mysql"
)
endif
()
if
(
_libmariadb_FOUND
)
set
(
_mysql_target
"_libmariadb"
)
else
()
set
(
_mysql_target
"_mariadb"
)
if
(
_mariadb_VERSION VERSION_LESS 10.4
)
get_property
(
_include_dirs
TARGET
"PkgConfig::_mariadb"
PROPERTY
"INTERFACE_INCLUDE_DIRECTORIES"
)
# Remove "${prefix}/mariadb/.." from the interface since it breaks other
# projects.
list
(
FILTER _include_dirs EXCLUDE REGEX
"
\\
.
\\
."
)
set_property
(
TARGET
"PkgConfig::_mariadb"
PROPERTY
"INTERFACE_INCLUDE_DIRECTORIES"
"
${
_include_dirs
}
"
)
unset
(
_include_dirs
)
pkg_check_modules
(
_mariadb
"mariadb"
QUIET IMPORTED_TARGET
)
if
(
NOT _mariadb_FOUND
)
pkg_check_modules
(
_mysql
"mysql"
QUIET IMPORTED_TARGET
)
if
(
_mysql_FOUND
)
set
(
_mysql_target
"_mysql"
)
endif
()
else
()
set
(
_mysql_target
"_mariadb"
)
if
(
_mariadb_VERSION VERSION_LESS 10.4
)
get_property
(
_include_dirs
TARGET
"PkgConfig::_mariadb"
PROPERTY
"INTERFACE_INCLUDE_DIRECTORIES"
)
# Remove "${prefix}/mariadb/.." from the interface since it breaks other
# projects.
list
(
FILTER _include_dirs EXCLUDE REGEX
"
\\
.
\\
."
)
set_property
(
TARGET
"PkgConfig::_mariadb"
PROPERTY
"INTERFACE_INCLUDE_DIRECTORIES"
"
${
_include_dirs
}
"
)
unset
(
_include_dirs
)
endif
()
endif
()
endif
()
...
...
Ben Boeckel
@ben.boeckel
mentioned in commit
b1730454
·
Oct 11, 2019
mentioned in commit
b1730454
mentioned in commit b1730454dc0773117fccee034b5acbbb1ae46c42
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment