Skip to content

Commit

Permalink
[mysql-connector-cpp] Disable attempting to copy all dependencies int…
Browse files Browse the repository at this point in the history
…o its own package. (microsoft#42558)
  • Loading branch information
BillyONeal authored Dec 6, 2024
1 parent 7d23867 commit 20a72ce
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 3 deletions.
13 changes: 13 additions & 0 deletions ports/mysql-connector-cpp/dependencies.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f24eb57..ec7c53d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -469,7 +469,7 @@ endif()
# system-wide). Here we arrange for the OpenSSL DLLs to be copied to the build
# location of the connector library after building it.

-if(WIN32 AND OPENSSL_LIB_DIR)
+if(WIN32 AND OPENSSL_LIB_DIR AND 0)

# Note: For simplicity we just copy any DLLs we can find at the given
# OpenSSL location.
diff --git a/cdk/cmake/DepFindCompression.cmake b/cdk/cmake/DepFindCompression.cmake
index 68f8e10..ebe7e31 100644
--- a/cdk/cmake/DepFindCompression.cmake
Expand Down
14 changes: 12 additions & 2 deletions ports/mysql-connector-cpp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED_LIBS)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_MSVCRT)

# Use mysql-connector-cpp's own build process.
# Preparing to merge STATIC library: connector (xapi;devapi)
# CMake Error at cmake/libutils.cmake:297 (message):
# Sorry but building static connector on Windows using MSVC toolset works
# only with msbuild at the moment.
# Call Stack (most recent call first):
# CMakeLists.txt:413 (merge_libraries)
set(USE_MSBUILD_ARG)
if(BUILD_STATIC)
set(USE_MSBUILD_ARG WINDOWS_USE_MSBUILD)
endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
WINDOWS_USE_MSBUILD
${USE_MSBUILD_ARG}
OPTIONS
"-DWITH_SSL=${CURRENT_INSTALLED_DIR}"
"-DWITH_LZ4=${CURRENT_INSTALLED_DIR}"
Expand Down
1 change: 1 addition & 0 deletions ports/mysql-connector-cpp/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "mysql-connector-cpp",
"version": "9.1.0",
"port-version": 1,
"description": "This is a release of MySQL Connector/C++, the C++ interface for communicating with MySQL servers.",
"homepage": "https://github.com/mysql/mysql-connector-cpp",
"license": null,
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6214,7 +6214,7 @@
},
"mysql-connector-cpp": {
"baseline": "9.1.0",
"port-version": 0
"port-version": 1
},
"nameof": {
"baseline": "0.10.4",
Expand Down
5 changes: 5 additions & 0 deletions versions/m-/mysql-connector-cpp.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "a1e99552e0b1ff9e507f46cdda63911e77dba19a",
"version": "9.1.0",
"port-version": 1
},
{
"git-tree": "54ee1f8995fb28c0666bdcc6e98c8adfe272cef0",
"version": "9.1.0",
Expand Down

0 comments on commit 20a72ce

Please sign in to comment.