diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-06-29 15:28:20 +0300 |
---|---|---|
committer | Sergei Krivonos <sergeikrivonos@gmail.com> | 2021-11-09 12:06:49 +0200 |
commit | e45f7f485a4c8133962a4082636412745ed07093 (patch) | |
tree | 0db604740eb97a1fc4c4a55e57688b38593b3ec0 /sql/CMakeLists.txt | |
parent | 1a3570dec35733e725cc6000a06ec666facf4235 (diff) | |
download | mariadb-git-e45f7f485a4c8133962a4082636412745ed07093.tar.gz |
In case WITH_WSREP is enabled, build wsrep as plugin
If it is not enabled, build wsrep as static "stub" library from wsrep_dummy.cc
ยด
Allow static plugins to export symbols (on Unix)
wsrep_info relies on wsrep defined symbols (e.g LOCK_wsrep_config_state)
exported from mysqld
Diffstat (limited to 'sql/CMakeLists.txt')
-rw-r--r-- | sql/CMakeLists.txt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt index 4dd34e80f2d..ec3b0c528bb 100644 --- a/sql/CMakeLists.txt +++ b/sql/CMakeLists.txt @@ -36,9 +36,10 @@ IF(WITH_WSREP AND NOT EMBEDDED_LIBRARY) wsrep_plugin.cc service_wsrep.cc ) - SET(WSREP_LIB wsrep-lib wsrep_api_v26) + MYSQL_ADD_PLUGIN(wsrep ${WSREP_SOURCES} MANDATORY EXPORT_SYMBOLS LINK_LIBRARIES wsrep-lib wsrep_api_v26) ELSE() - SET(WSREP_SOURCES wsrep_dummy.cc) + ADD_LIBRARY(wsrep STATIC wsrep_dummy.cc) + ADD_DEPENDENCIES(wsrep GenError) ENDIF() INCLUDE_DIRECTORIES( @@ -142,7 +143,6 @@ SET (SQL_SOURCE opt_split.cc rowid_filter.cc rowid_filter.h opt_trace.cc - ${WSREP_SOURCES} table_cache.cc encryption.cc temporary_tables.cc proxy_protocol.cc backup.cc xa.cc ${CMAKE_CURRENT_BINARY_DIR}/sql_yacc.cc @@ -180,11 +180,10 @@ DTRACE_INSTRUMENT(sql) TARGET_LINK_LIBRARIES(sql mysys mysys_ssl dbug strings vio pcre ${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} - ${WSREP_LIB} ${SSL_LIBRARIES} ${LIBSYSTEMD}) -FOREACH(se aria partition perfschema sql_sequence) +FOREACH(se aria partition perfschema sql_sequence wsrep) # These engines are used directly in sql sources. IF(TARGET ${se}) TARGET_LINK_LIBRARIES(sql ${se}) |