-
Notifications
You must be signed in to change notification settings - Fork 6.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update to 3.1.15 * Modernize portfile * Keep plugins * Always use vcpkg zlib instead vendored copy * Use zlib and openssl modules in pc file * Always install pc file, drop non-relocatable mariadb_config * UWP is not supported * Use schannel SSL backend on windows * Fix exported includedir and libdir * Fixup windows pc file * Disable extra static lib * Disable plugins with extra dependencies * [libmariadb] Namespace targets with unofficial:: * Update versions * Enable CI for x86-windows: no conflict with mysql * Re-enable lib mariadbclient via feature * Use openssl targets to handle multi-config * Update versions * CR request * Update versions
- Loading branch information
Showing
14 changed files
with
199 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 33565f5..d83176d 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -280,7 +280,7 @@ IF(NOT WITH_SSL STREQUAL "OFF") | ||
IF(OPENSSL_FOUND) | ||
ADD_DEFINITIONS(-DHAVE_OPENSSL -DHAVE_TLS) | ||
SET(SSL_SOURCES "${CC_SOURCE_DIR}/libmariadb/secure/openssl.c") | ||
- SET(SSL_LIBRARIES ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY}) | ||
+ SET(SSL_LIBRARIES OpenSSL::SSL) | ||
IF(WIN32) | ||
CHECK_INCLUDE_FILES (${OPENSSL_INCLUDE_DIR}/openssl/applink.c HAVE_OPENSSL_APPLINK_C) | ||
ENDIF() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt | ||
index 39fa709..a726a6d 100644 | ||
--- a/libmariadb/CMakeLists.txt | ||
+++ b/libmariadb/CMakeLists.txt | ||
@@ -455,10 +455,14 @@ IF(NOT WIN32) | ||
SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}") | ||
ENDIF() | ||
|
||
+if(VCPKG_MARIADBCLIENT) | ||
INSTALL(TARGETS mariadbclient | ||
COMPONENT Development | ||
EXPORT unofficial-libmariadb-targets | ||
LIBRARY DESTINATION lib) | ||
+else() | ||
+ set_target_properties(mariadbclient PROPERTIES EXCLUDE_FROM_ALL 1) | ||
+endif() | ||
INSTALL(TARGETS libmariadb | ||
COMPONENT SharedLibraries | ||
EXPORT unofficial-libmariadb-targets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 0be0fb1..33565f5 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -393,7 +393,7 @@ ENDIF() | ||
INCLUDE(${CC_SOURCE_DIR}/plugins/CMakeLists.txt) | ||
ADD_SUBDIRECTORY(include) | ||
ADD_SUBDIRECTORY(libmariadb) | ||
-IF(NOT WIN32) | ||
+IF(1) | ||
ADD_SUBDIRECTORY(mariadb_config) | ||
ENDIF() | ||
|
||
diff --git a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt | ||
index 70e619b..7a22fa1 100644 | ||
--- a/mariadb_config/CMakeLists.txt | ||
+++ b/mariadb_config/CMakeLists.txt | ||
@@ -30,6 +30,15 @@ IF(${rllength} GREATER 0) | ||
LIST(REMOVE_DUPLICATES SYSTEM_LIBS) | ||
ENDIF() | ||
|
||
+set(REQUIRES_PRIVATE "" CACHE STRING "") | ||
+if(WITH_SSL STREQUAL "OPENSSL") | ||
+ list(REMOVE_ITEM SYSTEM_LIBS ${SSL_LIBRARIES}) | ||
+ string(APPEND REQUIRES_PRIVATE " openssl") | ||
+endif() | ||
+if(WITH_EXTERNAL_ZLIB) | ||
+ string(APPEND REQUIRES_PRIVATE " zlib") | ||
+endif() | ||
+ | ||
FOREACH (LIB_NAME ${SYSTEM_LIBS}) | ||
GET_LIB_NAME(${LIB_NAME} LIB_OUT) | ||
SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} ${LIB_OUT}") | ||
@@ -50,6 +59,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mariadb_config.c.in | ||
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmariadb.pc.in | ||
${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc @ONLY) | ||
|
||
+if(0) | ||
ADD_EXECUTABLE(mariadb_config ${CMAKE_CURRENT_BINARY_DIR}/mariadb_config.c) | ||
|
||
IF(CMAKE_SYSTEM_NAME MATCHES AIX) | ||
@@ -61,6 +71,7 @@ ENDIF() | ||
INSTALL(TARGETS mariadb_config | ||
DESTINATION "bin" | ||
COMPONENT Development) | ||
+endif() | ||
|
||
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc | ||
DESTINATION "${INSTALL_PCDIR}" | ||
diff --git a/mariadb_config/libmariadb.pc.in b/mariadb_config/libmariadb.pc.in | ||
index 968181a..3f0410d 100644 | ||
--- a/mariadb_config/libmariadb.pc.in | ||
+++ b/mariadb_config/libmariadb.pc.in | ||
@@ -16,5 +16,6 @@ Description: MariaDB Connector/C dynamic library | ||
Cflags: -I${includedir} | ||
Libs: -L${libdir} -lmariadb | ||
Libs.private: @extra_dynamic_LDFLAGS@ | ||
+Requires.private: @REQUIRES_PRIVATE@ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,65 @@ | ||
{ | ||
"name": "libmariadb", | ||
"version-semver": "3.1.12", | ||
"port-version": 2, | ||
"version-semver": "3.1.15", | ||
"description": "MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases", | ||
"homepage": "https://github.com/MariaDB/mariadb-connector-c", | ||
"default-features": [ | ||
"openssl", | ||
"supports": "!uwp", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
}, | ||
"zlib" | ||
], | ||
"default-features": [ | ||
"ssl" | ||
], | ||
"features": { | ||
"iconv": { | ||
"description": "Enables character set conversion", | ||
"dependencies": [ | ||
"libiconv" | ||
] | ||
}, | ||
"mariadbclient": { | ||
"description": "Build the static mariadbclient library" | ||
}, | ||
"openssl": { | ||
"description": "Enable SSL support", | ||
"description": "SSL support (OpenSSL)", | ||
"dependencies": [ | ||
"openssl" | ||
] | ||
}, | ||
"zlib": { | ||
"description": "Use internal zlib", | ||
"schannel": { | ||
"description": "SSL support (Secure Channel)" | ||
}, | ||
"ssl": { | ||
"description": "Default SSL backend", | ||
"dependencies": [ | ||
"zlib" | ||
{ | ||
"name": "libmariadb", | ||
"default-features": false, | ||
"features": [ | ||
"schannel" | ||
], | ||
"platform": "windows | mingw" | ||
}, | ||
{ | ||
"name": "libmariadb", | ||
"default-features": false, | ||
"features": [ | ||
"openssl" | ||
], | ||
"platform": "!windows & !mingw" | ||
} | ||
] | ||
}, | ||
"zlib": { | ||
"description": "Obsolete. zlib is always used. This feature is left for compatibility." | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.