summaryrefslogtreecommitdiff
path: root/dev-db/mysql-connector-c++/files
diff options
context:
space:
mode:
Diffstat (limited to 'dev-db/mysql-connector-c++/files')
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch15
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch45
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.15-fix-build.patch307
-rw-r--r--dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch275
4 files changed, 0 insertions, 642 deletions
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch
deleted file mode 100644
index 4b8a4a983096..000000000000
--- a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.11-fix-cpp-linking.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-https://bugs.mysql.com/bug.php?id=90727
-
---- a/FindMySQL.cmake
-+++ b/FindMySQL.cmake
-@@ -700,8 +700,10 @@ endif()
-
- # For dynamic linking use the built-in sys and strings
- if(NOT MYSQLCLIENT_STATIC_LINKING)
-+IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
- list(APPEND SYS_LIBRARIES "mysql_sys")
- list(APPEND SYS_LIBRARIES "mysql_strings")
-+endif()
- list(APPEND SYS_LIBRARIES ${MYSQL_LIBRARIES})
- SET(MYSQL_LIBRARIES ${SYS_LIBRARIES})
-
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch
deleted file mode 100644
index 35ed218e18dc..000000000000
--- a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.8-fix-mariadb.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -aurN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp
---- a/driver/mysql_connection.cpp 2016-12-14 04:58:54.000000000 -0500
-+++ b/driver/mysql_connection.cpp 2017-01-26 16:33:58.086005627 -0500
-@@ -1023,6 +1023,7 @@
- proxy->get_character_set_info(&cs);
- *(static_cast<int *>(optionValue)) = cs.mbmaxlen;
- /* mysql_get_option() was added in mysql 5.7.3 version */
-+#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
- } else if ( proxy->get_server_version() >= 50703 ) {
- try {
- if (GET_CONN_OPTION(optionName, optionValue, intOptions)) {
-@@ -1036,6 +1037,7 @@
- CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str());
- throw e;
- }
-+#endif
- }
- }
- /* }}} */
-@@ -1053,11 +1055,13 @@
- MY_CHARSET_INFO cs;
- proxy->get_character_set_info(&cs);
- return cs.dir ? sql::SQLString(cs.dir) : "";
-+#if !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
- } else if ( proxy->get_server_version() >= 50703 ) {
- const char* optionValue= NULL;
- if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) {
- return optionValue ? sql::SQLString(optionValue) : "";
- }
-+#endif
- }
- return "";
- }
-diff -aurN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp
---- a/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:35:46.256038741 -0500
-+++ b/driver/nativeapi/libmysql_static_proxy.cpp 2017-01-26 16:28:34.114915809 -0500
-@@ -319,7 +319,7 @@
- int
- LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg)
- {
--#if MYSQL_VERSION_ID >= 50703
-+#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) && !defined ( MARIADB_VERSION_ID )
- if (::mysql_get_option(mysql, option, arg)) {
- throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()");
- } else {
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.15-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.15-fix-build.patch
deleted file mode 100644
index 4e3996914109..000000000000
--- a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.15-fix-build.patch
+++ /dev/null
@@ -1,307 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -666,7 +666,7 @@ set_target_properties(connector PROPERTIES
-
-
- install(TARGETS connector
-- CONFIGURATIONS Release RelWithDebInfo
-+ CONFIGURATIONS Release RelWithDebInfo Gentoo
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
- RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
-@@ -737,6 +737,12 @@ TARGET_LINK_LIBRARIES(try connector)
- SET_INTERFACE_OPTIONS(try devapi)
- # ADD_GCOV(try)
-
-+IF(WITH_SSL STREQUAL "system")
-+ find_package(OpenSSL REQUIRED)
-+ TARGET_LINK_LIBRARIES(try ${OPENSSL_LIBRARIES})
-+ENDIF()
-+
-+
- if(WITH_JDBC)
-
- add_executable(try_jdbc EXCLUDE_FROM_ALL try_jdbc.cc)
---- a/cdk/cmake/install_macros.cmake
-+++ b/cdk/cmake/install_macros.cmake
-@@ -327,7 +327,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
- DESTINATION ${ARG_DESTINATION}
- ${RENAME_PARAM}
- ${PERMISSIONS_${target_type}}
-- CONFIGURATIONS Release RelWithDebInfo
-+ CONFIGURATIONS Release RelWithDebInfo Gentoo
- COMPONENT ${ARG_COMPONENT}
- OPTIONAL)
-
-@@ -346,7 +346,7 @@ FUNCTION(INSTALL_DEBUG_TARGET target)
- INSTALL(FILES ${debug_pdb_target_location}
- DESTINATION ${ARG_PDB_DESTINATION}
- ${PDB_RENAME_PARAM}
-- CONFIGURATIONS Release RelWithDebInfo
-+ CONFIGURATIONS Release RelWithDebInfo Gentoo
- COMPONENT ${ARG_COMPONENT}
- OPTIONAL)
- ENDIF()
---- a/cdk/cmake/libutils.cmake
-+++ b/cdk/cmake/libutils.cmake
-@@ -282,14 +282,7 @@ function(add_library_ex TARGET)
- endforeach()
-
- if(libs)
--
-- if(${type} STREQUAL "STATIC")
-- merge_static_libraries(${TARGET} ${libs})
-- add_dependencies(${TARGET} ${libs})
-- else()
- target_link_libraries(${TARGET} PRIVATE ${libs})
-- endif()
--
- endif()
-
- #
---- a/cdk/cmake/protobuf.cmake
-+++ b/cdk/cmake/protobuf.cmake
-@@ -26,201 +26,8 @@
- # along with this program; if not, write to the Free Software Foundation, Inc.,
- # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
--#
--# Usage:
--#
--# INCLUDE(protobuf)
--# [USE_FULL_PROTOBUF()]
--#
--# MYSQLX_PROTOBUF_GENERATE_CPP(SRCS HDRS <protobuf definitions>)
--# ADD_LIBRARY(target ... ${SRCS})
--#
--
--if(DEFINED WITH_PROTOBUF)
--
-- #
-- # If WITH_PROTOBUF is defined, it should point at external location where
-- # protobuf libraries were built using our CMakeLists.txt (so that
-- # exports.cmake was produced).
-- #
--
-- if (NOT EXISTS "${WITH_PROTOBUF}/exports.cmake")
-- message(FATAL_ERROR
-- "Valid protobuf build not found at the given location"
-- " (could not find exports.cmake): ${WITH_PROTOBUF}"
-- )
-- endif()
--
-- message("Using protobuf build at: ${WITH_PROTOBUF}")
--
--else(DEFINED WITH_PROTOBUF)
--
-- #
-- # If external WITH_PROTOBUF location is not given, then we arrange for
-- # building of protbuf from bundled sources in ${PROJECT_BINARY_DIR}/protobuf.
-- #
--
-- message("Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}")
-- file(REMOVE "${PROJECT_BINARY_DIR}/protobuf/CMakeCache.txt")
-- file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/protobuf")
--
-- #
-- # Pick build configuration for the protobuf build. Normally we build using the
-- # same build configuration that is used for building CDK (Release/Debug/etc.).
-- # But we also support building CDK under non-standard build configuration
-- # named 'Static' (this is a dirty trick we use to simplify building our MSIs).
-- # Since protobuf does not know 'Static' build configuration, we build protobuf
-- # under 'Release' configuration in that case.
-- #
-- # We need to handle two cases. For some build systems, like Makefiles,
-- # the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
-- # variable. In that case we also set it during protobuf build configuration.
-- # Another case is a multi-configuration build system like MSVC. In this case
-- # we use generator expression to pick correct configuration when the build
-- # command is invoked below.
-- #
--
-- if(CMAKE_BUILD_TYPE)
-- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
-- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
-- else()
-- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
-- endif()
-- endif()
--
-- set(CONFIG_EXPR
-- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
-- )
--
-- execute_process(
-- COMMAND ${CMAKE_COMMAND}
-- -G "${CMAKE_GENERATOR}"
-- ${set_build_type}
-- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
-- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
-- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
-- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
-- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
-- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
-- ${PROJECT_SOURCE_DIR}/protobuf
-- WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/protobuf
-- RESULT_VARIABLE protobuf_config
-- )
--
-- if(protobuf_config)
-- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
-- endif()
--
-- set(WITH_PROTOBUF "${PROJECT_BINARY_DIR}/protobuf")
--
--endif(DEFINED WITH_PROTOBUF)
--
--# Import targets exported by protobuf
--
--include(${WITH_PROTOBUF}/exports.cmake)
--
--#
--# Protobuf library targets imported above (pb_protobuf
--# and pb_protobuf-lite) are local to the directory from which
--# they were imported. This is not good if cdk is used as
--# a sub-project of a parent project, because the parent project
--# must have access to these targets.
--#
--# For that reason below we create global protobuf/protobuf-lite targets
--# and copy their locations from the imported targets.
--#
--# Note: we can't use ALIAS library because it does not work with imported
--# targets
--#
--
--add_library(protobuf STATIC IMPORTED GLOBAL)
--add_library(protobuf-lite STATIC IMPORTED GLOBAL)
--
--foreach(lib protobuf protobuf-lite)
-- #message("processing: ${lib}")
--
-- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
-- #message("- CONF: ${CONF}")
--
-- get_target_property(LOC pb_${lib} IMPORTED_LOCATION_${CONF})
-- if(LOC)
-- #message("- setting imported location to: ${LOC}")
-- set_target_properties(${lib} PROPERTIES
-- IMPORTED_LOCATION_${CONF} "${LOC}"
-- )
-- set_property(TARGET ${lib} APPEND PROPERTY
-- IMPORTED_CONFIGURATIONS ${CONF}
-- )
-- endif()
--
-- endforeach(CONF)
--
--endforeach(lib)
--
--#
--# To support 'Static' build configuration the targets imported from the
--# Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
--# 'Release' locations as Protobuf is built using 'Release' configuration in
--# that case.
--#
--
--foreach(tgt protobuf protobuf-lite pb_protoc)
--
-- get_target_property(LOC ${tgt} IMPORTED_LOCATION_RELEASE)
-- set_property(TARGET ${tgt} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
--
--endforeach(tgt)
--
--
--# protobuf depends on protobuf-lite
--
--set_target_properties(protobuf PROPERTIES
-- INTERFACE_LINK_LIBRARIES "protobuf-lite"
--)
--
--
--message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
--
--set(PROTOBUF_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIR}
-- CACHE INTERNAL "Protobuf include path" FORCE)
--set(PROTOBUF_PROTOC_EXECUTABLE pb_protoc
-- CACHE INTERNAL "Protobuf compiler" FORCE)
--
--#
--# Custom target build_protobuf ensures that Protobuf project is built.
--#
--# Note: this depends on Protobuf project generating the stamp file
--#
--
--if(NOT DEFINED PROTOBUF_BUILD_STAMP)
-- message(FATAL_ERROR "Protobuf build stamp file not defined")
--endif()
--
--
--if(CMAKE_VERSION VERSION_LESS 3.0)
-- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
-- COMMAND ${CMAKE_COMMAND} --build . --config $<CONFIGURATION>
-- WORKING_DIRECTORY ${WITH_PROTOBUF}
-- COMMENT "Building protobuf using configuration: $(Configuration)"
-- )
--else()
-- add_custom_command(OUTPUT ${PROTOBUF_BUILD_STAMP}
-- COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG_EXPR}
-- WORKING_DIRECTORY ${WITH_PROTOBUF}
-- COMMENT "Building protobuf using configuration: $(Configuration)"
-- )
--endif()
--
--add_custom_target(build_protobuf
-- DEPENDS ${PROTOBUF_BUILD_STAMP}
--)
--
--add_dependencies(protobuf build_protobuf)
--add_dependencies(protobuf-lite build_protobuf)
--add_dependencies(pb_protoc build_protobuf)
-+#SET(Protobuf_USE_STATIC_LIBS ON)
-+find_package(Protobuf REQUIRED)
-
- #
- # Choice between full and lite version of the library.
---- a/cdk/protocol/mysqlx/crud.cc
-+++ b/cdk/protocol/mysqlx/crud.cc
-@@ -295,7 +295,7 @@ public:
- class Placeholder_conv_imp
- : public Args_conv
- {
-- map<string, unsigned> m_map;
-+ std::map<string, unsigned> m_map;
-
- public:
-
-@@ -303,7 +303,7 @@ public:
-
- unsigned conv_placeholder(const string &name)
- {
-- map<string, unsigned>::const_iterator it = m_map.find(name);
-+ std::map<string, unsigned>::const_iterator it = m_map.find(name);
- if (it == m_map.end())
- throw_error("Placeholder converter: Placeholder was not defined on args");
- //throw Generic_error((boost::format("Placeholder %s was not defined on args.")
-@@ -314,7 +314,7 @@ public:
-
- void add_placeholder(const string &name)
- {
-- map<string, unsigned>::const_iterator it = m_map.find(name);
-+ std::map<string, unsigned>::const_iterator it = m_map.find(name);
- if (it != m_map.end())
- throw_error("Placeholder converter: Redefined placeholder");
- //throw Generic_error((boost::format("Redifined placeholder %s.")
---- a/jdbc.cmake
-+++ b/jdbc.cmake
-@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
- list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
- endif()
-
--list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
-+list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
-
- if(CMAKE_BUILD_TYPE)
- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch
deleted file mode 100644
index 484220442ab8..000000000000
--- a/dev-db/mysql-connector-c++/files/mysql-connector-c++-8.0.18-fix-build.patch
+++ /dev/null
@@ -1,275 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -463,7 +463,7 @@ set_target_properties(connector PROPERTIES
-
-
- install(TARGETS connector
-- CONFIGURATIONS Release RelWithDebInfo
-+ CONFIGURATIONS Release RelWithDebInfo Gentoo
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
- RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
---- a/cdk/cmake/DepFindProtobuf.cmake
-+++ b/cdk/cmake/DepFindProtobuf.cmake
-@@ -48,197 +48,7 @@ if(TARGET Protobuf::pb)
- return()
- endif()
-
--message(STATUS "Setting up Protobuf.")
--
--set(PB_SOURCE_DIR "${PROJECT_SOURCE_DIR}/protobuf")
--set(PB_BINARY_DIR "${PROJECT_BINARY_DIR}/protobuf")
--set(config_stamp "${PB_BINARY_DIR}/config.stamp")
--set(build_stamp "${PB_BINARY_DIR}/build.stamp")
--
--
--#
--# Pick build configuration for the protobuf build. Normally we build using the
--# same build configuration that is used for building CDK (Release/Debug/etc.).
--# But we also support building CDK under non-standard build configuration
--# named 'Static' (this is a dirty trick we use to simplify building our MSIs).
--# Since protobuf does not know 'Static' build configuration, we build protobuf
--# under 'Release' configuration in that case.
--#
--# We need to handle two cases. For some build systems, like Makefiles,
--# the build configuration is specified at cmake time using CMAKE_BUILD_TYPE
--# variable. In that case we also set it during protobuf build configuration.
--# Another case is a multi-configuration build system like MSVC. In this case
--# we use generator expression to pick correct configuration when the build
--# command is invoked below.
--#
--
--set(build_type)
--if(CMAKE_BUILD_TYPE)
-- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
-- set(set_build_type -DCMAKE_BUILD_TYPE=Release)
-- else()
-- set(set_build_type -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE})
-- endif()
--endif()
--
--set(CONFIG_EXPR
-- $<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
--)
--
--
--if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
--
-- message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}")
--
-- file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
-- file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
--
-- # Dirty trick to speed up cmake set up time.
-- #file(
-- # COPY "${CMAKE_BINARY_DIR}/CMakeFiles/${CMAKE_VERSION}"
-- # DESTINATION "${PB_BINARY_DIR}/CMakeFiles"
-- #)
--
-- execute_process(
-- COMMAND ${CMAKE_COMMAND}
-- -G "${CMAKE_GENERATOR}"
-- ${set_build_type}
-- -DSTATIC_MSVCRT=${STATIC_MSVCRT}
-- -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
-- -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-- -DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS}
-- -DCMAKE_CXX_FLAGS_DEBUG=${CMAKE_CXX_FLAGS_DEBUG}
-- -DCMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}
-- -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=${CMAKE_CXX_FLAGS_RELWITHDEBINFO}
-- -DCMAKE_CXX_FLAGS_MINSIZEREL=${CMAKE_CXX_FLAGS_MINSIZEREL}
-- -DCMAKE_STATIC_LINKER_FLAGS=${CMAKE_STATIC_LINKER_FLAGS}
-- ${PB_SOURCE_DIR}
-- WORKING_DIRECTORY ${PB_BINARY_DIR}
-- RESULT_VARIABLE protobuf_config
-- )
--
-- if(protobuf_config)
-- message(FATAL_ERROR "Could not configure Protobuf build: ${protobuf_config}")
-- endif()
--
-- message("==== Protobuf build configured.")
--
--endif()
--
--
--include(${PB_BINARY_DIR}/exports.cmake)
--
--#
--# Protobuf library targets imported above (pb_protobuf
--# and pb_protobuf-lite) are local to the directory from which
--# they were imported. This is not good if cdk is used as
--# a sub-project of a parent project, because the parent project
--# must have access to these targets.
--#
--# For that reason below we create global protobuf/protobuf-lite targets
--# and copy their locations from the imported targets.
--#
--# Note: we can't use ALIAS library because it does not work with imported
--# targets
--#
--
--add_library(Protobuf::pb-full STATIC IMPORTED GLOBAL)
--add_library(Protobuf::pb-lite STATIC IMPORTED GLOBAL)
--add_executable(Protobuf::protoc IMPORTED GLOBAL)
--
--set(TGT_protobuf Protobuf::pb-full)
--set(TGT_protobuf-lite Protobuf::pb-lite)
--set(TGT_protoc Protobuf::protoc)
--
--foreach(tgt protobuf protobuf-lite protoc)
--
-- #message("processing: ${tgt}")
--
-- set(loc_list)
--
-- foreach(CONF NOCONFIG DEBUG RELEASE MINSIZEREL RELWITHDEBINFO)
--
-- #message("- CONF: ${CONF}")
--
-- get_target_property(LOC pb_${tgt} IMPORTED_LOCATION_${CONF})
--
-- if(LOC)
--
-- #message("- setting imported location to: ${LOC}")
-- list(APPEND loc_list "${LOC}")
--
-- set_target_properties(${TGT_${tgt}} PROPERTIES
-- IMPORTED_LOCATION_${CONF} "${LOC}"
-- )
--
-- set_property(TARGET ${TGT_${tgt}} APPEND PROPERTY
-- IMPORTED_CONFIGURATIONS ${CONF}
-- )
--
-- endif()
--
-- endforeach(CONF)
--
-- #
-- # To support 'Static' build configuration the targets imported from the
-- # Protobuf project need to have IMPORTED_LOCATION_STATIC defined. We use
-- # 'Release' locations as Protobuf is built using 'Release' configuration in
-- # that case.
-- #
--
-- get_target_property(LOC ${TGT_${tgt}} IMPORTED_LOCATION_RELEASE)
-- set_property(TARGET ${TGT_${tgt}} PROPERTY IMPORTED_LOCATION_STATIC ${LOC})
--
--endforeach(tgt)
--
--
--#message("Protobuf include path: ${PROTOBUF_INCLUDE_DIR}")
--set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_INCLUDE_DIR} CACHE INTERNAL "")
--
--set_target_properties(Protobuf::pb-lite PROPERTIES
-- INTERFACE_INCLUDE_DIRECTORIES "${PROTOBUF_INCLUDE_DIR}"
--)
--
--set_target_properties(Protobuf::pb-full PROPERTIES
-- INTERFACE_LINK_LIBRARIES Protobuf::pb-lite
--)
--
--# On UNIX Protobuf uses pthread library
--if(UNIX)
-- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
-- INTERFACE_LINK_LIBRARIES pthread
-- )
--endif()
--
--#
--# Note: This is needed to correctly compile headers generated by protobuf
--# with sunpro compiler.
--#
--
--if(SUNPRO)
-- set_property(TARGET Protobuf::pb-lite APPEND PROPERTY
-- INTERFACE_COMPILE_DEFINITIONS SOLARIS_64BIT_ENABLED
-- )
--endif()
--
--
--add_custom_command(OUTPUT "${build_stamp}"
-- COMMAND ${CMAKE_COMMAND} --build . --config ${CONFIG_EXPR}
-- COMMAND ${CMAKE_COMMAND} -E touch "${build_stamp}"
-- WORKING_DIRECTORY "${PB_BINARY_DIR}"
-- COMMENT "Building protobuf"
--)
--
--add_custom_target(build_protobuf
-- SOURCES "${build_stamp}"
--)
--
--add_dependencies(Protobuf::pb-full build_protobuf)
--add_dependencies(Protobuf::pb-lite build_protobuf)
--add_dependencies(Protobuf::protoc build_protobuf)
--
--# TODO: Handle lite/full version
--
-+find_package(Protobuf REQUIRED)
-
-
- # Standard PROTOBUF_GENERATE_CPP modified to our usage
-@@ -268,11 +78,11 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
- "${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
- COMMAND ${CMAKE_COMMAND}
- -E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
-- COMMAND Protobuf::protoc
-+ COMMAND ${Protobuf_PROTOC_EXECUTABLE}
- ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
- -I ${ABS_PATH} ${ABS_FIL}
-- --proto_path=${PROJECT_SOURCE_DIR}/protobuf/protobuf-3.6.1/src
-- DEPENDS ${ABS_FIL} #${PROTOBUF_PROTOC_EXECUTABLE}
-+ --proto_path=${Protobuf_INCLUDE_DIR}
-+ DEPENDS ${ABS_FIL} #${Protobuf_PROTOC_EXECUTABLE}
- COMMENT "Running C++ protocol buffer compiler on ${FIL}"
- VERBATIM
- )
---- a/cdk/core/CMakeLists.txt
-+++ b/cdk/core/CMakeLists.txt
-@@ -44,7 +44,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
-
- target_link_libraries(cdk
- PUBLIC cdk_mysqlx cdk_parser
-- PRIVATE Protobuf::pb-lite # required by codecc.cc
-+ PRIVATE protobuf # required by codecc.cc
- )
-
- add_coverage(cdk)
---- a/cdk/protocol/mysqlx/CMakeLists.txt
-+++ b/cdk/protocol/mysqlx/CMakeLists.txt
-@@ -125,11 +125,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
- ${CMAKE_CURRENT_BINARY_DIR}
- )
-
--if(use_full_protobuf)
-- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-full)
--else()
-- target_link_libraries(cdk_proto_mysqlx PRIVATE Protobuf::pb-lite)
--endif()
-+target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf)
-
- target_link_libraries(cdk_proto_mysqlx PRIVATE cdk_foundation)
-
---- a/jdbc.cmake
-+++ b/jdbc.cmake
-@@ -66,7 +66,7 @@ if(MYSQL_CONFIG_EXECUTABLE)
- list(APPEND jdbc_cmake_opts -DMYSQL_CONFIG_EXECUTABLE=${MYSQL_CONFIG_EXECUTABLE})
- endif()
-
--list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=ON)
-+list(APPEND jdbc_cmake_opts -DMYSQLCLIENT_STATIC_LINKING=OFF)
-
- if(CMAKE_BUILD_TYPE)
- if(CMAKE_BUILD_TYPE MATCHES "[Ss][Tt][Aa][Tt][Ii][Cc]")
---- a/jdbc/CMakeLists.txt
-+++ b/jdbc/CMakeLists.txt
-@@ -272,7 +272,7 @@ set_target_properties(connector-jdbc
-
-
- install(TARGETS connector-jdbc
-- CONFIGURATIONS Release RelWithDebInfo
-+ CONFIGURATIONS Release RelWithDebInfo Gentoo
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT JDBCDev
- RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT JDBCDll