Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,10 @@

INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${PCRE_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/mysys_ssl
${ZLIB_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
$<TARGET_PROPERTY:mariadb_ssl,INTERFACE_INCLUDE_DIRECTORIES>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The ${ZLIB_INCLUDE_DIRS} variable was removed from the directory-level INCLUDE_DIRECTORIES in client/CMakeLists.txt, but it was not replaced with $<TARGET_PROPERTY:mariadb_zlib,INTERFACE_INCLUDE_DIRECTORIES>. Since client tools (such as mysqldump or mysqlbinlog) directly or transitively include zlib.h, and they do not link directly to MariaDB::zlib (they link to ${CLIENT_LIB} which is libmariadb), this will cause compilation failures when using a bundled or non-standard zlib. Please add the mariadb_zlib interface include directories here.

  $<TARGET_PROPERTY:mariadb_zlib,INTERFACE_INCLUDE_DIRECTORIES>
  $<TARGET_PROPERTY:mariadb_ssl,INTERFACE_INCLUDE_DIRECTORIES>

${CMAKE_SOURCE_DIR}/sql
${CMAKE_SOURCE_DIR}/strings
${MY_READLINE_INCLUDE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)

Expand All @@ -40,13 +37,13 @@ MYSQL_ADD_EXECUTABLE(mariadb completion_hash.cc mysql.cc readline.cc
${CMAKE_SOURCE_DIR}/sql/sql_string.cc)
TARGET_LINK_LIBRARIES(mariadb ${CLIENT_LIB})
IF(UNIX)
TARGET_LINK_LIBRARIES(mariadb ${MY_READLINE_LIBRARY})
TARGET_LINK_LIBRARIES(mariadb MariaDB::readline)
SET_TARGET_PROPERTIES(mariadb PROPERTIES ENABLE_EXPORTS TRUE)
ENDIF(UNIX)

MYSQL_ADD_EXECUTABLE(mariadb-test mysqltest.cc ${CMAKE_SOURCE_DIR}/sql/sql_string.cc COMPONENT Test)
SET_SOURCE_FILES_PROPERTIES(mysqltest.cc PROPERTIES COMPILE_FLAGS "-DTHREADS ${PCRE2_DEBIAN_HACK}")
TARGET_LINK_LIBRARIES(mariadb-test ${CLIENT_LIB} pcre2-posix pcre2-8)
TARGET_LINK_LIBRARIES(mariadb-test ${CLIENT_LIB} MariaDB::pcre2-posix MariaDB::pcre2-8)
SET_TARGET_PROPERTIES(mariadb-test PROPERTIES ENABLE_EXPORTS TRUE)


Expand Down
9 changes: 9 additions & 0 deletions cmake/libfmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ MACRO (CHECK_LIBFMT)
ELSE()
FIND_FILE(Libfmt_core_h fmt/core.h) # for build_depends.cmake
ENDIF()
# MariaDB::fmt - header-only fmt, pointing at the bundled or the system copy.
# (the sources that use it #define FMT_HEADER_ONLY themselves)
ADD_LIBRARY(mariadb_fmt INTERFACE)
TARGET_INCLUDE_DIRECTORIES(mariadb_fmt INTERFACE ${LIBFMT_INCLUDE_DIR})
IF(TARGET libfmt)
# bundled: make sure the headers are downloaded before consumers compile
ADD_DEPENDENCIES(mariadb_fmt libfmt)
ENDIF()
ADD_LIBRARY(MariaDB::fmt ALIAS mariadb_fmt)
ENDMACRO()

MARK_AS_ADVANCED(LIBFMT_INCLUDE_DIR)
15 changes: 15 additions & 0 deletions cmake/pcre.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,20 @@ MACRO (CHECK_PCRE)
ENDIF()
ENDIF()
ENDIF()
# MariaDB::pcre2-8 and MariaDB::pcre2-posix - the pcre2 libraries plus their
# headers, pointing at the bundled imported targets or the system libraries.
# For the bundled case the include dir comes from the pcre2 targets; for
# system from PCRE_INCLUDE_DIRS.
IF(NOT TARGET mariadb_pcre2_8)
ADD_LIBRARY(mariadb_pcre2_8 INTERFACE)
TARGET_LINK_LIBRARIES(mariadb_pcre2_8 INTERFACE pcre2-8)
TARGET_INCLUDE_DIRECTORIES(mariadb_pcre2_8 INTERFACE ${PCRE_INCLUDE_DIRS})
ADD_LIBRARY(MariaDB::pcre2-8 ALIAS mariadb_pcre2_8)

ADD_LIBRARY(mariadb_pcre2_posix INTERFACE)
TARGET_LINK_LIBRARIES(mariadb_pcre2_posix INTERFACE pcre2-posix)
TARGET_INCLUDE_DIRECTORIES(mariadb_pcre2_posix INTERFACE ${PCRE_INCLUDE_DIRS})
ADD_LIBRARY(MariaDB::pcre2-posix ALIAS mariadb_pcre2_posix)
ENDIF()
ENDMACRO()

12 changes: 8 additions & 4 deletions cmake/plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,16 @@ MACRO(MYSQL_ADD_PLUGIN)
)
IF(NOT WITHOUT_SERVER OR ARG_CLIENT)

# Add common include directories
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
# Add common include directories. zlib and ssl headers are made available to
# all plugins (several engines #include <zlib.h>, and violite.h pulls in
# <openssl/ssl.h> under HAVE_OPENSSL); the dirs come from the MariaDB::zlib /
# MariaDB::OpenSSL targets so we don't rely on the FindZLIB / FindOpenSSL
# result variables.
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/sql
${PCRE_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIRS})
$<TARGET_PROPERTY:mariadb_zlib,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:mariadb_ssl,INTERFACE_INCLUDE_DIRECTORIES>)

LIST(GET ARG_UNPARSED_ARGUMENTS 0 plugin)
SET(SOURCES ${ARG_UNPARSED_ARGUMENTS})
Expand Down
11 changes: 11 additions & 0 deletions cmake/readline.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,16 @@ MACRO (MYSQL_CHECK_READLINE)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF(NOT WIN32)
CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)

# MariaDB::readline - bundled readline or system readline/libedit (+curses).
# Empty on Windows (no readline there); consumers may link it unconditionally.
ADD_LIBRARY(mariadb_readline INTERFACE)
IF(MY_READLINE_LIBRARY)
TARGET_LINK_LIBRARIES(mariadb_readline INTERFACE ${MY_READLINE_LIBRARY})
ENDIF()
IF(MY_READLINE_INCLUDE_DIR)
TARGET_INCLUDE_DIRECTORIES(mariadb_readline INTERFACE ${MY_READLINE_INCLUDE_DIR})
ENDIF()
ADD_LIBRARY(MariaDB::readline ALIAS mariadb_readline)
ENDMACRO()

24 changes: 24 additions & 0 deletions cmake/ssl.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ MACRO (MYSQL_USE_BUNDLED_SSL)
CHANGE_SSL_SETTINGS("bundled")
ADD_SUBDIRECTORY(extra/wolfssl)
MESSAGE_ONCE(SSL_LIBRARIES "SSL_LIBRARIES = ${SSL_LIBRARIES}")
ADD_LIBRARY(mariadb_ssl INTERFACE)
TARGET_LINK_LIBRARIES(mariadb_ssl INTERFACE wolfssl)
TARGET_INCLUDE_DIRECTORIES(mariadb_ssl INTERFACE ${INC_DIRS})
TARGET_COMPILE_DEFINITIONS(mariadb_ssl INTERFACE
HAVE_OPENSSL HAVE_WOLFSSL WOLFSSL_USER_SETTINGS)
ENDMACRO()

# MYSQL_CHECK_SSL
Expand Down Expand Up @@ -141,11 +146,29 @@ MACRO (MYSQL_CHECK_SSL)
SET(SSL_INTERNAL_INCLUDE_DIRS "")
SET(SSL_DEFINES "-DHAVE_OPENSSL")

ADD_LIBRARY(mariadb_ssl INTERFACE)
TARGET_LINK_LIBRARIES(mariadb_ssl INTERFACE
OpenSSL::SSL OpenSSL::Crypto)
# Put the include dir on the target itself (not only transitively via
# OpenSSL::SSL) so $<TARGET_PROPERTY:mariadb_ssl,INTERFACE_INCLUDE_DIRECTORIES>
# also works for consumers that need the openssl headers but do not link
# the library (violite.h pulls in <openssl/ssl.h> under HAVE_OPENSSL).
TARGET_INCLUDE_DIRECTORIES(mariadb_ssl INTERFACE ${OPENSSL_INCLUDE_DIR})
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
TARGET_LINK_LIBRARIES(mariadb_ssl INTERFACE ${LIBSOCKET})
ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
TARGET_LINK_LIBRARIES(mariadb_ssl INTERFACE ${CMAKE_DL_LIBS})
ENDIF()
TARGET_COMPILE_DEFINITIONS(mariadb_ssl INTERFACE HAVE_OPENSSL)

# Silence "deprecated in OpenSSL 3.0"
IF((NOT OPENSSL_VERSION) # 3.0 not determined by older cmake
OR NOT(OPENSSL_VERSION VERSION_LESS "3.0.0"))
SET(SSL_DEFINES "${SSL_DEFINES} -DOPENSSL_API_COMPAT=0x10100000L")
SET(CMAKE_REQUIRED_DEFINITIONS -DOPENSSL_API_COMPAT=0x10100000L)
TARGET_COMPILE_DEFINITIONS(mariadb_ssl INTERFACE
OPENSSL_API_COMPAT=0x10100000L)
ENDIF()

SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR})
Expand Down Expand Up @@ -174,6 +197,7 @@ MACRO (MYSQL_CHECK_SSL)
MESSAGE(FATAL_ERROR
"Wrong option for WITH_SSL. Valid values are: ${WITH_SSL_DOC}")
ENDIF()
ADD_LIBRARY(MariaDB::OpenSSL ALIAS mariadb_ssl)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

If WITH_SSL is set to no or none (disabling SSL), the mariadb_ssl target is never created. This causes a fatal CMake error when ADD_LIBRARY(MariaDB::OpenSSL ALIAS mariadb_ssl) is called unconditionally at the end of the macro. To prevent this, ensure mariadb_ssl is always defined (even as an empty INTERFACE library) if it does not already exist.

  IF(NOT TARGET mariadb_ssl)
    ADD_LIBRARY(mariadb_ssl INTERFACE)
  ENDIF()
  ADD_LIBRARY(MariaDB::OpenSSL ALIAS mariadb_ssl)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can't compile without SSL.

ENDMACRO()


Expand Down
37 changes: 19 additions & 18 deletions cmake/zlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,30 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA

# Bundled zlib. Builds the bundled copy and points MariaDB::zlib at it.
# Note: we intentionally do NOT touch the standard FindZLIB result variables
# (ZLIB_FOUND, ZLIB_LIBRARIES, ZLIB_INCLUDE_DIR(S), ...). Overwriting them
# confuses other find_package() calls (notably under vcpkg).
MACRO (MYSQL_USE_BUNDLED_ZLIB)
SET(ZLIB_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib)
SET(BUILD_BUNDLED_ZLIB 1)
SET(ZLIB_LIBRARIES zlib CACHE INTERNAL "Bundled zlib library")
# temporarily define ZLIB_LIBRARY and ZLIB_INCLUDE_DIR for libmariadb
SET(ZLIB_LIBRARY ${ZLIB_LIBRARIES})
SET(ZLIB_INCLUDE_DIR ${ZLIB_INCLUDE_DIRS})
SET(ZLIB_FOUND TRUE)
IF(VCPKG_INSTALLED_DIR)
# Avoid errors in vcpkg's FIND_PACKAGE
# for packages dependend on zlib
SET(CMAKE_DISABLE_FIND_PACKAGE_ZLIB 1)
ENDIF()
SET(ZLIB_BUNDLED_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_BINARY_DIR}/zlib
CACHE INTERNAL "Bundled zlib include directories")
SET(WITH_ZLIB "bundled" CACHE STRING "Use bundled zlib")
ADD_SUBDIRECTORY(zlib)
ADD_LIBRARY(mariadb_zlib INTERFACE)
TARGET_LINK_LIBRARIES(mariadb_zlib INTERFACE zlib)
TARGET_INCLUDE_DIRECTORIES(mariadb_zlib INTERFACE ${ZLIB_BUNDLED_INCLUDE_DIR})
ENDMACRO()

# MYSQL_CHECK_ZLIB_WITH_COMPRESS
#
# Provides the following configure options:
# WITH_ZLIB_BUNDLED
# If this is set,we use bundled zlib
# If this is not set,search for system zlib.
# if system zlib is not found, use bundled copy
# ZLIB_LIBRARIES, ZLIB_INCLUDE_DIRS
# are set after this macro has run
# WITH_ZLIB=[bundled|system]
# If this is "bundled", we use bundled zlib.
# Otherwise search for system zlib, and fall back to the bundled copy if it
# is not found (or not usable).
# Defines the MariaDB::zlib target, which points at either the system
# ZLIB::ZLIB or the bundled zlib, and carries the right include directories.

MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)

Expand All @@ -60,14 +58,17 @@ MACRO (MYSQL_CHECK_ZLIB_WITH_COMPRESS)
IF(HAVE_CRC32 AND HAVE_COMPRESSBOUND AND HAVE_DEFLATEBOUND)
SET(WITH_ZLIB "system" CACHE STRING
"Which zlib to use (possible values are 'bundled' or 'system')")
ADD_LIBRARY(mariadb_zlib INTERFACE)
TARGET_LINK_LIBRARIES(mariadb_zlib INTERFACE ZLIB::ZLIB)
ELSE()
SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable")
SET(ZLIB_FOUND FALSE)
MESSAGE(STATUS "system zlib found but not usable")
ENDIF()
ENDIF()
IF(NOT ZLIB_FOUND)
MYSQL_USE_BUNDLED_ZLIB()
ENDIF()
ENDIF()
ADD_LIBRARY(MariaDB::zlib ALIAS mariadb_zlib)
SET(HAVE_COMPRESS 1)
ENDMACRO()
2 changes: 1 addition & 1 deletion extra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${ZLIB_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)

# Default install component for the files is Server here
SET(MYSQL_INSTALL_COMPONENT Server)
Expand Down
3 changes: 1 addition & 2 deletions extra/mariabackup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ INCLUDE_DIRECTORIES(
)

IF(NOT HAVE_SYSTEM_REGEX)
INCLUDE_DIRECTORIES(${PCRE_INCLUDE_DIRS})
ADD_DEFINITIONS(${PCRE2_DEBIAN_HACK})
ENDIF()

Expand Down Expand Up @@ -85,7 +84,7 @@ SET_TARGET_PROPERTIES(mariadb-backup PROPERTIES ENABLE_EXPORTS TRUE)
TARGET_LINK_LIBRARIES(mariadb-backup sql sql_builtins aria)

IF(NOT HAVE_SYSTEM_REGEX)
TARGET_LINK_LIBRARIES(mariadb-backup pcre2-posix)
TARGET_LINK_LIBRARIES(mariadb-backup MariaDB::pcre2-posix)
ENDIF()


Expand Down
2 changes: 1 addition & 1 deletion libmariadb
20 changes: 8 additions & 12 deletions libmysqld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,13 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA

ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDED_LIBRARY
${SSL_DEFINES})
ADD_DEFINITIONS(-DMYSQL_SERVER -DEMBEDDED_LIBRARY)

INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysqld
${CMAKE_SOURCE_DIR}/sql
${CMAKE_BINARY_DIR}/sql
${PCRE_INCLUDE_DIRS}
${LIBFMT_INCLUDE_DIR}
${ZLIB_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/sql
${SSL_INTERNAL_INCLUDE_DIRS}
)

Expand Down Expand Up @@ -162,7 +157,8 @@ ENDIF()
IF(TARGET libfmt)
ADD_DEPENDENCIES(sql_embedded libfmt)
ENDIF()
TARGET_LINK_LIBRARIES(sql_embedded LINK_PRIVATE tpool ${CRC32_LIBRARY} pcre2-8)
TARGET_LINK_LIBRARIES(sql_embedded LINK_PRIVATE tpool ${CRC32_LIBRARY}
MariaDB::pcre2-8 MariaDB::fmt MariaDB::OpenSSL MariaDB::zlib)

# On Windows, static embedded server library is called mysqlserver.lib
# On Unix, it is libmysqld.a
Expand All @@ -177,9 +173,9 @@ ELSE()
ENDIF()


SET(LIBS
dbug strings mysys mysys_ssl pcre2-8 vio
${ZLIB_LIBRARIES} ${SSL_LIBRARIES}
SET(LIBS
dbug strings mysys mysys_ssl MariaDB::pcre2-8 vio
MariaDB::zlib MariaDB::OpenSSL
${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS}
${EMBEDDED_PLUGIN_LIBS}
sql_embedded
Expand Down
6 changes: 2 additions & 4 deletions libmysqld/examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/libmysqld/include
${PCRE_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/sql
${MY_READLINE_INCLUDE_DIR}
)


Expand All @@ -29,12 +27,12 @@ MYSQL_ADD_EXECUTABLE(mariadb-embedded ../../client/completion_hash.cc
COMPONENT Client)
TARGET_LINK_LIBRARIES(mariadb-embedded mysqlserver)
IF(UNIX)
TARGET_LINK_LIBRARIES(mariadb-embedded ${MY_READLINE_LIBRARY})
TARGET_LINK_LIBRARIES(mariadb-embedded MariaDB::readline)
ENDIF(UNIX)

MYSQL_ADD_EXECUTABLE(mariadb-test-embedded ../../client/mysqltest.cc
COMPONENT Test)
TARGET_LINK_LIBRARIES(mariadb-test-embedded mysqlserver pcre2-posix pcre2-8)
TARGET_LINK_LIBRARIES(mariadb-test-embedded mysqlserver MariaDB::pcre2-posix MariaDB::pcre2-8)
SET_SOURCE_FILES_PROPERTIES(../../client/mysqltest.cc PROPERTIES COMPILE_FLAGS "${PCRE2_DEBIAN_HACK}")

IF(CMAKE_GENERATOR MATCHES "Xcode")
Expand Down
4 changes: 2 additions & 2 deletions mysys/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA

INCLUDE_DIRECTORIES(${ZLIB_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys)
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys)

SET(MYSYS_SOURCES array.c charset-def.c charset.c my_default.c
get_password.c
Expand Down Expand Up @@ -164,7 +164,7 @@ ENDIF()

ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
MAYBE_DISABLE_IPO(mysys)
TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARIES}
TARGET_LINK_LIBRARIES(mysys dbug strings MariaDB::zlib
${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO})
DTRACE_INSTRUMENT(mysys)

Expand Down
9 changes: 2 additions & 7 deletions mysys_ssl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,7 @@
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1335 USA

INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/mysys_ssl
${SSL_INCLUDE_DIRS})

IF(SSL_DEFINES)
ADD_DEFINITIONS(${SSL_DEFINES})
ENDIF()
${CMAKE_SOURCE_DIR}/mysys_ssl)

SET(MYSYS_SSL_HIDDEN_SOURCES
my_sha1.cc
Expand All @@ -45,5 +40,5 @@ IF(WITH_SSL STREQUAL "bundled" AND HAVE_VISIBILITY_HIDDEN)
ENDIF()

ADD_CONVENIENCE_LIBRARY(mysys_ssl ${MYSYS_SSL_SOURCES})
TARGET_LINK_LIBRARIES(mysys_ssl dbug strings ${SSL_LIBRARIES})
TARGET_LINK_LIBRARIES(mysys_ssl dbug strings MariaDB::OpenSSL)
DTRACE_INSTRUMENT(mysys_ssl)
8 changes: 2 additions & 6 deletions plugin/feedback/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql
${PCRE_INCLUDE_DIRS}
${SSL_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)

SET(FEEDBACK_SOURCES feedback.cc sender_thread.cc
url_base.cc url_http.cc utils.cc)

ADD_DEFINITIONS(${SSL_DEFINES})

INCLUDE (CheckIncludeFiles)
CHECK_INCLUDE_FILES (netdb.h HAVE_NETDB_H)
IF(HAVE_NETDB_H)
Expand All @@ -18,6 +14,6 @@ IF(WIN32)
ENDIF(WIN32)

MYSQL_ADD_PLUGIN(FEEDBACK ${FEEDBACK_SOURCES}
LINK_LIBRARIES ${SSL_LIBRARIES}
LINK_LIBRARIES MariaDB::OpenSSL
${MAYBE_STATIC_ONLY} RECOMPILE_FOR_EMBEDDED DEFAULT)

3 changes: 1 addition & 2 deletions plugin/qc_info/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql
${PCRE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/sql)

MYSQL_ADD_PLUGIN(QUERY_CACHE_INFO qc_info.cc RECOMPILE_FOR_EMBEDDED)
Loading