From a54f2f9fbb50fbb4a7539d3b2dc19505f9dad731 Mon Sep 17 00:00:00 2001 From: toge Date: Sat, 28 Jan 2023 00:30:25 +0900 Subject: [PATCH] (#15040) mariadb-connector-c: add version 3.1.19/3.3.3 * mariadb-connector-c: add version 3.1.19/3.3.3 * add end line * fix patch_type * remove man folder * fix shared build * remove WX option * apply patch to 3.1.19 --- recipes/mariadb-connector-c/all/conandata.yml | 74 ++++++++-- recipes/mariadb-connector-c/all/conanfile.py | 3 +- ...01-fix-install-and-static-or-shared.patch} | 0 ... 3.1.11-0002-msvc-no-override-md-zi.patch} | 0 ...0003-include-order-windows-winsock2.patch} | 0 ...11-0004-include-mysqld_error-header.patch} | 0 ...3.1.11-0005-fix-cmake-connectorname.patch} | 0 ...001-fix-install-and-static-or-shared.patch | 122 +++++++++++++++++ .../patches/3.1.19-0002-remove-wx-flag.patch | 13 ++ ...001-fix-install-and-static-or-shared.patch | 127 ++++++++++++++++++ recipes/mariadb-connector-c/config.yml | 4 + 11 files changed, 332 insertions(+), 11 deletions(-) rename recipes/mariadb-connector-c/all/patches/{0001-fix-install-and-static-or-shared.patch => 3.1.11-0001-fix-install-and-static-or-shared.patch} (100%) rename recipes/mariadb-connector-c/all/patches/{0002-msvc-no-override-md-zi.patch => 3.1.11-0002-msvc-no-override-md-zi.patch} (100%) rename recipes/mariadb-connector-c/all/patches/{0003-include-order-windows-winsock2.patch => 3.1.11-0003-include-order-windows-winsock2.patch} (100%) rename recipes/mariadb-connector-c/all/patches/{0004-include-mysqld_error-header.patch => 3.1.11-0004-include-mysqld_error-header.patch} (100%) rename recipes/mariadb-connector-c/all/patches/{0005-fix-cmake-connectorname.patch => 3.1.11-0005-fix-cmake-connectorname.patch} (100%) create mode 100644 recipes/mariadb-connector-c/all/patches/3.1.19-0001-fix-install-and-static-or-shared.patch create mode 100644 recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch create mode 100644 recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch diff --git a/recipes/mariadb-connector-c/all/conandata.yml b/recipes/mariadb-connector-c/all/conandata.yml index a74dc266f29826..74a7f76fab54c6 100644 --- a/recipes/mariadb-connector-c/all/conandata.yml +++ b/recipes/mariadb-connector-c/all/conandata.yml @@ -1,4 +1,10 @@ sources: + "3.3.3": + url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.3.3/mariadb-connector-c-3.3.3-src.tar.gz" + sha256: "d77630e2376fe08185b5354621c877b0a203a6b186a0694574d37b764aeb2874" + "3.1.19": + url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.1.19/mariadb-connector-c-3.1.19-src.tar.gz" + sha256: "3cafe6e197a0610e9a77aea4f0733a52e0697e8557998de4c4156c242e1ff405" "3.1.12": url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.1.12/mariadb-connector-c-3.1.12-src.tar.gz" sha256: "2f5ae14708b4813e4ff6857d152c22e6fc0e551c9fa743c1ef81a68e3254fe63" @@ -6,15 +12,63 @@ sources: url: "https://downloads.mariadb.com/Connectors/c/connector-c-3.1.11/mariadb-connector-c-3.1.11-src.tar.gz" sha256: "3e6f6c399493fe90efdc21a3fe70c30434b7480e8195642a959f1dd7a0fa5b0f" patches: + "3.3.3": + - patch_file: "patches/3.3.3-0001-fix-install-and-static-or-shared.patch" + patch_description: "fix install path, separate static/shared build" + patch_type: "conan" + - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" + patch_description: "remove WX flags in MSVC" + patch_type: "conan" + - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" + patch_description: "fix include order for windows winsock2" + patch_type: "portability" + - patch_file: "patches/3.1.11-0004-include-mysqld_error-header.patch" + patch_description: "always include mysqld_error.h" + patch_type: "portability" + "3.1.19": + - patch_file: "patches/3.1.19-0001-fix-install-and-static-or-shared.patch" + patch_description: "fix install path, separate static/shared build" + patch_type: "conan" + - patch_file: "patches/3.1.19-0002-remove-wx-flag.patch" + patch_description: "remove WX flags in MSVC" + patch_type: "conan" + - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" + patch_description: "fix include order for windows winsock2" + patch_type: "portability" + - patch_file: "patches/3.1.11-0004-include-mysqld_error-header.patch" + patch_description: "always include mysqld_error.h" + patch_type: "portability" "3.1.12": - - patch_file: "patches/0001-fix-install-and-static-or-shared.patch" - - patch_file: "patches/0002-msvc-no-override-md-zi.patch" - - patch_file: "patches/0003-include-order-windows-winsock2.patch" - - patch_file: "patches/0004-include-mysqld_error-header.patch" - - patch_file: "patches/0005-fix-cmake-connectorname.patch" + - patch_file: "patches/3.1.11-0001-fix-install-and-static-or-shared.patch" + patch_description: "fix install path, separate static/shared build" + patch_type: "conan" + - patch_file: "patches/3.1.11-0002-msvc-no-override-md-zi.patch" + patch_description: "honor conan's build type" + patch_type: "conan" + - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" + patch_description: "fix include order for windows winsock2" + patch_type: "portability" + - patch_file: "patches/3.1.11-0004-include-mysqld_error-header.patch" + patch_description: "always include mysqld_error.h" + patch_type: "portability" + - patch_file: "patches/3.1.11-0005-fix-cmake-connectorname.patch" + patch_description: "fix wrong function name END()" + patch_type: "bugfix" + patch_source: "https://github.com/mariadb-corporation/mariadb-connector-c/commit/242cab8cbcd91af882233730a83627d3b12ced83" "3.1.11": - - patch_file: "patches/0001-fix-install-and-static-or-shared.patch" - - patch_file: "patches/0002-msvc-no-override-md-zi.patch" - - patch_file: "patches/0003-include-order-windows-winsock2.patch" - - patch_file: "patches/0004-include-mysqld_error-header.patch" - - patch_file: "patches/0005-fix-cmake-connectorname.patch" + - patch_file: "patches/3.1.11-0001-fix-install-and-static-or-shared.patch" + patch_description: "fix install path, separate static/shared build" + patch_type: "conan" + - patch_file: "patches/3.1.11-0002-msvc-no-override-md-zi.patch" + patch_description: "honor conan's build type" + patch_type: "conan" + - patch_file: "patches/3.1.11-0003-include-order-windows-winsock2.patch" + patch_description: "fix include order for windows winsock2" + patch_type: "portability" + - patch_file: "patches/3.1.11-0004-include-mysqld_error-header.patch" + patch_description: "always include mysqld_error.h" + patch_type: "portability" + - patch_file: "patches/3.1.11-0005-fix-cmake-connectorname.patch" + patch_description: "fix wrong function name END()" + patch_type: "bugfix" + patch_source: "https://github.com/mariadb-corporation/mariadb-connector-c/commit/242cab8cbcd91af882233730a83627d3b12ced83" diff --git a/recipes/mariadb-connector-c/all/conanfile.py b/recipes/mariadb-connector-c/all/conanfile.py index c754d56ff28d93..506ffe3e1ec2fe 100644 --- a/recipes/mariadb-connector-c/all/conanfile.py +++ b/recipes/mariadb-connector-c/all/conanfile.py @@ -120,6 +120,7 @@ def package(self): cmake.install() rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) rmdir(self, os.path.join(self.package_folder, "symbols")) + rmdir(self, os.path.join(self.package_folder, "man")) rm(self, "*.pdb", os.path.join(self.package_folder, "lib")) def package_info(self): @@ -134,7 +135,7 @@ def package_info(self): self.cpp_info.system_libs.append("secur32") plugin_dir = os.path.join(self.package_folder, "lib", "plugin").replace("\\", "/") - self.output.info("Prepending to MARIADB_PLUGIN_DIR runtime environment variable: {}".format(plugin_dir)) + self.output.info(f"Prepending to MARIADB_PLUGIN_DIR runtime environment variable: {plugin_dir}") self.runenv_info.prepend_path("MARIADB_PLUGIN_DIR", plugin_dir) # TODO: to remove in conan v2? diff --git a/recipes/mariadb-connector-c/all/patches/0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.1.11-0001-fix-install-and-static-or-shared.patch similarity index 100% rename from recipes/mariadb-connector-c/all/patches/0001-fix-install-and-static-or-shared.patch rename to recipes/mariadb-connector-c/all/patches/3.1.11-0001-fix-install-and-static-or-shared.patch diff --git a/recipes/mariadb-connector-c/all/patches/0002-msvc-no-override-md-zi.patch b/recipes/mariadb-connector-c/all/patches/3.1.11-0002-msvc-no-override-md-zi.patch similarity index 100% rename from recipes/mariadb-connector-c/all/patches/0002-msvc-no-override-md-zi.patch rename to recipes/mariadb-connector-c/all/patches/3.1.11-0002-msvc-no-override-md-zi.patch diff --git a/recipes/mariadb-connector-c/all/patches/0003-include-order-windows-winsock2.patch b/recipes/mariadb-connector-c/all/patches/3.1.11-0003-include-order-windows-winsock2.patch similarity index 100% rename from recipes/mariadb-connector-c/all/patches/0003-include-order-windows-winsock2.patch rename to recipes/mariadb-connector-c/all/patches/3.1.11-0003-include-order-windows-winsock2.patch diff --git a/recipes/mariadb-connector-c/all/patches/0004-include-mysqld_error-header.patch b/recipes/mariadb-connector-c/all/patches/3.1.11-0004-include-mysqld_error-header.patch similarity index 100% rename from recipes/mariadb-connector-c/all/patches/0004-include-mysqld_error-header.patch rename to recipes/mariadb-connector-c/all/patches/3.1.11-0004-include-mysqld_error-header.patch diff --git a/recipes/mariadb-connector-c/all/patches/0005-fix-cmake-connectorname.patch b/recipes/mariadb-connector-c/all/patches/3.1.11-0005-fix-cmake-connectorname.patch similarity index 100% rename from recipes/mariadb-connector-c/all/patches/0005-fix-cmake-connectorname.patch rename to recipes/mariadb-connector-c/all/patches/3.1.11-0005-fix-cmake-connectorname.patch diff --git a/recipes/mariadb-connector-c/all/patches/3.1.19-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.1.19-0001-fix-install-and-static-or-shared.patch new file mode 100644 index 00000000000000..64399d7ee68cb6 --- /dev/null +++ b/recipes/mariadb-connector-c/all/patches/3.1.19-0001-fix-install-and-static-or-shared.patch @@ -0,0 +1,122 @@ +diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt +index f257926..a78329e 100644 +--- a/libmariadb/CMakeLists.txt ++++ b/libmariadb/CMakeLists.txt +@@ -379,7 +379,7 @@ ELSE() + ENDIF() + + +-IF(CMAKE_VERSION VERSION_GREATER 2.8.7) ++IF(FALSE) + # CREATE OBJECT LIBRARY + ADD_LIBRARY(mariadb_obj OBJECT ${LIBMARIADB_SOURCES}) + IF(UNIX) +@@ -405,26 +405,28 @@ IF(WIN32) + "FILE_DESCRIPTION:Dynamic lib for client/server communication") + ENDIF() + +- ++IF(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS}) +- ++ELSE() + IF(UNIX) + ADD_LIBRARY(libmariadb SHARED ${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 SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE} mariadbclient.def) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() + + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS}) + + SIGN_TARGET(libmariadb) ++ENDIF() + +-IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC) ++IF(CMAKE_SIZEOF_VOID_P EQUAL 8 AND MSVC AND NOT BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES STATIC_LIBRARY_FLAGS "/machine:x64") + ENDIF() + ++IF(BUILD_SHARED_LIBS) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + CMAKE_SYSTEM_NAME MATCHES "kFreeBSD" OR + CMAKE_SYSTEM_NAME MATCHES "GNU") +@@ -434,10 +436,14 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINK_FLAGS "${CC_BINARY_DIR}/libmariadb/mariadbclient.def") + ENDIF() + ++ELSE() + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") ++ENDIF() ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") + + SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "") ++ENDIF() + + # + # Installation +@@ -457,11 +463,15 @@ IF(WITH_MYSQLCOMPAT) + ENDIF() + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + create_symlink(libmariadb${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_LIBDIR}) ++ENDIF() + ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION + ${CPACK_PACKAGE_VERSION_MAJOR} + SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}) ++ELSE() + + IF(NOT WIN32) + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}") +@@ -469,20 +479,33 @@ ENDIF() + + INSTALL(TARGETS mariadbclient + COMPONENT Development +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(WIN32) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ELSE() + # in cmake 3.12+ we can use + #INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} + # COMPONENT SharedLibraries NAMELINK_COMPONENT Development) + # but as long as we build on CentOS 7 with its cmake 2.8.12.2 we have to use +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT SharedLibraries NAMELINK_SKIP) +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT Development NAMELINK_ONLY) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT SharedLibraries) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT Development) + ENDIF() + + IF(MSVC) +@@ -491,3 +514,4 @@ IF(MSVC) + CONFIGURATIONS Debug RelWithDebInfo + COMPONENT Development) + ENDIF() ++ENDIF() diff --git a/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch b/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch new file mode 100644 index 00000000000000..4dde44415f18b4 --- /dev/null +++ b/recipes/mariadb-connector-c/all/patches/3.1.19-0002-remove-wx-flag.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f3b6cbd..f3e8993 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -100,7 +100,7 @@ IF(MSVC) + ADD_DEFINITIONS(-DWIN32_LEAN_AND_MEAN) + IF (MSVC) + # Treat warnings as errors +- SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") ++ # SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -WX") + SET(CONFIG_TYPES "DEBUG" "RELEASE" "RELWITHDEBINFO") + FOREACH(BUILD_TYPE ${CONFIG_TYPES}) + FOREACH(COMPILER CXX C) diff --git a/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch new file mode 100644 index 00000000000000..8a6f9ad7f1f551 --- /dev/null +++ b/recipes/mariadb-connector-c/all/patches/3.3.3-0001-fix-install-and-static-or-shared.patch @@ -0,0 +1,127 @@ +diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt +index 070fdc9..77584e6 100644 +--- a/libmariadb/CMakeLists.txt ++++ b/libmariadb/CMakeLists.txt +@@ -288,7 +288,7 @@ SET(MARIADB_NONBLOCK_SYMBOLS + + # handle static plugins + SET(LIBMARIADB_SOURCES ${LIBMARIADB_SOURCES} ${LIBMARIADB_PLUGIN_SOURCES}) +-SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ${ZLIB_LIBRARY}) ++SET(SYSTEM_LIBS ${SYSTEM_LIBS} ${LIBMARIADB_PLUGIN_LIBS} ${ZSTD_LIBRARY} ZLIB::ZLIB) + MESSAGE(STATUS "SYSTEM_LIBS: ${SYSTEM_LIBS}") + INCLUDE_DIRECTORIES(${LIBMARIADB_PLUGIN_INCLUDES}) + ADD_DEFINITIONS(${LIBMARIADB_PLUGIN_DEFS}) +@@ -404,7 +404,7 @@ ELSE() + ENDIF() + + +-IF(CMAKE_VERSION VERSION_GREATER 2.8.7) ++IF(FALSE) + # CREATE OBJECT LIBRARY + ADD_LIBRARY(mariadb_obj OBJECT ${LIBMARIADB_SOURCES}) + IF(UNIX) +@@ -433,22 +433,24 @@ IF(WIN32) + "FILE_DESCRIPTION:Dynamic lib for client/server communication") + ENDIF() + +- ++IF(NOT BUILD_SHARED_LIBS) + ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS}) +- ++ELSE() + IF(UNIX) + ADD_LIBRARY(libmariadb SHARED ${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 SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE} mariadbclient.def) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() + + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS}) + + SIGN_TARGET(libmariadb) ++ENDIF() + ++IF(BUILD_SHARED_LIBS) + IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + CMAKE_SYSTEM_NAME MATCHES "kFreeBSD" OR + CMAKE_SYSTEM_NAME MATCHES "GNU") +@@ -457,11 +459,14 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux" OR + ENDIF() + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINK_FLAGS "${CC_BINARY_DIR}/libmariadb/mariadbclient.def") + ENDIF() +- ++ELSE() + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") ++ENDIF() ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES IMPORTED_INTERFACE_LINK_LIBRARIES "${SYSTEM_LIBS}") + + SET_TARGET_PROPERTIES(libmariadb PROPERTIES PREFIX "") ++ENDIF() + + # + # Installation +@@ -481,11 +486,15 @@ IF(WITH_MYSQLCOMPAT) + ENDIF() + ENDIF() + ++IF(NOT BUILD_SHARED_LIBS) + create_symlink(libmariadb${CMAKE_STATIC_LIBRARY_SUFFIX} mariadbclient ${INSTALL_LIBDIR}) ++ENDIF() + ++IF(BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES VERSION + ${CPACK_PACKAGE_VERSION_MAJOR} + SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}) ++ELSE() + + IF(NOT WIN32) + SET_TARGET_PROPERTIES(mariadbclient PROPERTIES OUTPUT_NAME "${LIBMARIADB_STATIC_NAME}") +@@ -493,20 +502,33 @@ ENDIF() + + INSTALL(TARGETS mariadbclient + COMPONENT Development +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) ++ENDIF() ++ ++IF(BUILD_SHARED_LIBS) + IF(WIN32) + INSTALL(TARGETS libmariadb + COMPONENT SharedLibraries +- DESTINATION ${INSTALL_LIBDIR}) ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + ELSE() + # in cmake 3.12+ we can use + #INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} + # COMPONENT SharedLibraries NAMELINK_COMPONENT Development) + # but as long as we build on CentOS 7 with its cmake 2.8.12.2 we have to use +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT SharedLibraries NAMELINK_SKIP) +-INSTALL(TARGETS libmariadb LIBRARY DESTINATION ${INSTALL_LIBDIR} +- COMPONENT Development NAMELINK_ONLY) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT SharedLibraries) ++INSTALL(TARGETS libmariadb LIBRARY ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ COMPONENT Development) + ENDIF() + + IF(MSVC) +@@ -515,3 +537,4 @@ IF(MSVC) + CONFIGURATIONS Debug RelWithDebInfo + COMPONENT Development) + ENDIF() ++ENDIF() diff --git a/recipes/mariadb-connector-c/config.yml b/recipes/mariadb-connector-c/config.yml index 74d65343f6ebd1..c4757604b999db 100644 --- a/recipes/mariadb-connector-c/config.yml +++ b/recipes/mariadb-connector-c/config.yml @@ -1,4 +1,8 @@ versions: + "3.3.3": + folder: all + "3.1.19": + folder: all "3.1.12": folder: all "3.1.11":