mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-04 03:19:00 +08:00
[libmariadb] Fix plugin installation, fix pkgconfig (#18769)
* [libmariadb] Fix plugin installation, fix pkgconfig * fix installation * update version stuff Co-authored-by: Billy Robert ONeal III <bion@microsoft.com>
This commit is contained in:
parent
8886d85ad0
commit
5293c8685a
@ -1,5 +1,5 @@
|
||||
diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
|
||||
index 083a863..6c8d932 100644
|
||||
index c109a20..e1fa3f1 100644
|
||||
--- a/libmariadb/CMakeLists.txt
|
||||
+++ b/libmariadb/CMakeLists.txt
|
||||
@@ -405,6 +405,7 @@ ELSE()
|
||||
@ -10,7 +10,7 @@ index 083a863..6c8d932 100644
|
||||
|
||||
TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS})
|
||||
|
||||
@@ -457,13 +458,25 @@ ENDIF()
|
||||
@@ -453,13 +454,25 @@ ENDIF()
|
||||
|
||||
INSTALL(TARGETS mariadbclient
|
||||
COMPONENT Development
|
||||
|
@ -1,18 +1,18 @@
|
||||
diff --git a/cmake/install_plugins.cmake b/cmake/install_plugins.cmake
|
||||
index b8d15ba..7f59db7 100644
|
||||
--- a/cmake/install_plugins.cmake
|
||||
+++ b/cmake/install_plugins.cmake
|
||||
@@ -8,7 +8,7 @@
|
||||
# plugin installation
|
||||
diff --git a/include/mariadb_version.h.in b/include/mariadb_version.h.in
|
||||
index a82dbb7..e9005fa 100644
|
||||
--- a/include/mariadb_version.h.in
|
||||
+++ b/include/mariadb_version.h.in
|
||||
@@ -30,7 +30,7 @@
|
||||
#define MARIADB_PACKAGE_VERSION_ID @MARIADB_PACKAGE_VERSION_ID@
|
||||
#define MARIADB_SYSTEM_TYPE "@CMAKE_SYSTEM_NAME@"
|
||||
#define MARIADB_MACHINE_TYPE "@CMAKE_SYSTEM_PROCESSOR@"
|
||||
-#define MARIADB_PLUGINDIR "@CMAKE_INSTALL_PREFIX@/@INSTALL_PLUGINDIR@"
|
||||
+#define MARIADB_PLUGINDIR "../@INSTALL_PLUGINDIR@"
|
||||
|
||||
MACRO(INSTALL_PLUGIN name binary_dir)
|
||||
- INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR})
|
||||
+ INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}/../../../bin/plugin)
|
||||
IF(MSVC)
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:${name}> COMPONENT Debuginfo
|
||||
DESTINATION symbols CONFIGURATIONS Debug RelWithDebInfo)
|
||||
/* mysqld compile time options */
|
||||
#ifndef MYSQL_CHARSET
|
||||
diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
|
||||
index 14e34ab..083a863 100644
|
||||
index bcfd4de..c109a20 100644
|
||||
--- a/libmariadb/CMakeLists.txt
|
||||
+++ b/libmariadb/CMakeLists.txt
|
||||
@@ -398,10 +398,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE})
|
||||
@ -28,7 +28,7 @@ index 14e34ab..083a863 100644
|
||||
TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE mariadbclient)
|
||||
SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C)
|
||||
ENDIF()
|
||||
@@ -457,13 +457,15 @@ ENDIF()
|
||||
@@ -453,13 +453,15 @@ ENDIF()
|
||||
|
||||
INSTALL(TARGETS mariadbclient
|
||||
COMPONENT Development
|
||||
@ -47,3 +47,16 @@ index 14e34ab..083a863 100644
|
||||
# On Windows, install PDB
|
||||
INSTALL(FILES $<TARGET_PDB_FILE:libmariadb> DESTINATION "${INSTALL_LIBDIR}"
|
||||
CONFIGURATIONS Debug RelWithDebInfo
|
||||
diff --git a/mariadb_config/mariadb_config.c.in b/mariadb_config/mariadb_config.c.in
|
||||
index 5574943..fc1ca7c 100644
|
||||
--- a/mariadb_config/mariadb_config.c.in
|
||||
+++ b/mariadb_config/mariadb_config.c.in
|
||||
@@ -210,7 +210,7 @@ end:
|
||||
}
|
||||
if (!p || !p[0])
|
||||
{
|
||||
- strncpy(installation_dir, "@CMAKE_SYSROOT@@CMAKE_INSTALL_PREFIX@", PATH_MAX - 1);
|
||||
+ strncpy(installation_dir, "../@CMAKE_INSTALL_PREFIX@", PATH_MAX - 1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -25,9 +25,9 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
)
|
||||
|
||||
if("openssl" IN_LIST FEATURES)
|
||||
set(WITH_SSL OPENSSL)
|
||||
set(WITH_SSL OPENSSL)
|
||||
else()
|
||||
set(WITH_SSL OFF)
|
||||
set(WITH_SSL OFF)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
@ -35,7 +35,8 @@ vcpkg_configure_cmake(
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
${FEATURE_OPTIONS}
|
||||
-DWITH_UNITTEST=OFF
|
||||
-DINSTALL_PLUGINDIR=plugin/${PORT}
|
||||
-DWITH_UNIT_TESTS=OFF
|
||||
-DWITH_CURL=OFF
|
||||
-DWITH_SSL=${WITH_SSL}
|
||||
)
|
||||
@ -44,15 +45,13 @@ vcpkg_install_cmake()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/unofficial-libmariadb TARGET_PATH share/unofficial-libmariadb)
|
||||
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
# remove debug header
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
||||
endif()
|
||||
|
||||
if(VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
# move headers
|
||||
file(RENAME
|
||||
@ -60,6 +59,10 @@ if(VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
${CURRENT_PACKAGES_DIR}/include)
|
||||
endif()
|
||||
|
||||
if (NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
vcpkg_copy_tools(TOOL_NAMES mariadb_config AUTO_CLEAN)
|
||||
endif()
|
||||
|
||||
# remove plugin folder
|
||||
file(REMOVE_RECURSE
|
||||
${CURRENT_PACKAGES_DIR}/lib/mariadb
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "libmariadb",
|
||||
"version-semver": "3.1.12",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"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": [
|
||||
|
@ -3342,7 +3342,7 @@
|
||||
},
|
||||
"libmariadb": {
|
||||
"baseline": "3.1.12",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"libmaxminddb": {
|
||||
"baseline": "1.4.3",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "64479ab60db54486912b858f760af83dd2474f1c",
|
||||
"version-semver": "3.1.12",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "98ab3766e520cc0e6804bdba42090eae12f9f24f",
|
||||
"version-semver": "3.1.12",
|
||||
|
Loading…
Reference in New Issue
Block a user