vcpkg/ports/libmariadb/fix-InstallPath.patch

63 lines
2.3 KiB
Diff
Raw Normal View History

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@"
/* mysqld compile time options */
#ifndef MYSQL_CHARSET
diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
index bcfd4de..c109a20 100644
--- a/libmariadb/CMakeLists.txt
+++ b/libmariadb/CMakeLists.txt
@@ -398,10 +398,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE})
TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS})
IF(UNIX)
- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE})
+ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE})
SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}")
ELSE()
- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def)
+ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def)
SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C)
ENDIF()
@@ -453,13 +453,15 @@ ENDIF()
INSTALL(TARGETS mariadbclient
COMPONENT Development
- DESTINATION ${INSTALL_LIBDIR})
+ LIBRARY DESTINATION lib)
INSTALL(TARGETS libmariadb
COMPONENT SharedLibraries
- DESTINATION ${INSTALL_LIBDIR})
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib)
-IF(MSVC)
+IF(0)
# 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;
}
}