early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,36 @@
diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake
index 5d4ef0d..bb0edf2 100644
--- a/cmake/SociBackend.cmake
+++ b/cmake/SociBackend.cmake
@@ -159,8 +159,14 @@ macro(soci_backend NAME)
${THIS_BACKEND_HEADERS})
target_link_libraries(${THIS_BACKEND_TARGET}
+ PUBLIC
${SOCI_CORE_TARGET}
${THIS_BACKEND_DEPENDS_LIBRARIES})
+
+ target_include_directories(${THIS_BACKEND_TARGET}
+ PUBLIC
+ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS}
+ )
if(WIN32)
set_target_properties(${THIS_BACKEND_TARGET}
@@ -197,9 +203,15 @@ macro(soci_backend NAME)
# Still need to link the libraries for tests to work
target_link_libraries (${THIS_BACKEND_TARGET_STATIC}
+ PUBLIC
${THIS_BACKEND_DEPENDS_LIBRARIES}
)
-
+
+ target_include_directories(${THIS_BACKEND_TARGET_STATIC}
+ PUBLIC
+ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS}
+ )
+
set_target_properties(${THIS_BACKEND_TARGET_STATIC}
PROPERTIES
OUTPUT_NAME ${THIS_BACKEND_OUTPUT_NAME}

View File

@@ -0,0 +1,14 @@
diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
index 1233568..9a7cb61 100644
--- a/cmake/modules/FindMySQL.cmake
+++ b/cmake/modules/FindMySQL.cmake
@@ -13,6 +13,9 @@
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+find_package(libmysql REQUIRED)
+set(MySQL_FOUND 1)
+return()
include(CheckCXXSourceCompiles)

View File

@@ -0,0 +1,12 @@
diff --git a/src/backends/mysql/session.cpp b/src/backends/mysql/session.cpp
index 383248c..86a5bfd 100644
--- a/src/backends/mysql/session.cpp
+++ b/src/backends/mysql/session.cpp
@@ -5,6 +5,7 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
+typedef bool my_bool;
#define SOCI_MYSQL_SOURCE
#include "soci/mysql/soci-mysql.h"

61
externals/vcpkg/ports/soci/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,61 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO SOCI/soci
REF 99e2d567161a302de4f99832af76e6d3b75b68e6 #version 4.0.2
SHA512 d08d2383808d46d5e9550e9c7d93fb405d9e336eb38d974ba429e5b9446d3af53d4e702b90e80c67e298333da0145457fa1146d9773322676030be69de4ec4f4
HEAD_REF master
PATCHES
fix-dependency-libmysql.patch
export-include-dirs.patch
fix-mysql-feature-error.patch # https://bugs.mysql.com/bug.php?id=85131
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SOCI_STATIC)
# Handle features
set(_COMPONENT_FLAGS "")
foreach(_feature IN LISTS ALL_FEATURES)
# Uppercase the feature name and replace "-" with "_"
string(TOUPPER "${_feature}" _FEATURE)
string(REPLACE "-" "_" _FEATURE "${_FEATURE}")
# Turn "-DWITH_*=" ON or OFF depending on whether the feature
# is in the list.
if(_feature IN_LIST FEATURES)
list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=ON")
else()
list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF")
endif()
if(_feature MATCHES "mysql")
set(MYSQL_OPT -DMYSQL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/mysql)
endif()
endforeach()
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DSOCI_TESTS=OFF
-DSOCI_CXX11=ON
-DSOCI_STATIC=${SOCI_STATIC}
-DSOCI_SHARED=${SOCI_DYNAMIC}
${_COMPONENT_FLAGS}
${MYSQL_OPT}
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/SOCI)
if ("mysql" IN_LIST FEATURES)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCIConfig.cmake"
"# Create imported target SOCI::soci_mysql"
"\ninclude(CMakeFindDependencyMacro)\nfind_dependency(libmysql)\n# Create imported target SOCI::soci_mysql"
)
endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE_1_0.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

49
externals/vcpkg/ports/soci/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,49 @@
{
"name": "soci",
"version": "4.0.2",
"description": "SOCI database access library",
"homepage": "https://github.com/SOCI/soci",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"features": {
"boost": {
"description": "Integration with Boost",
"dependencies": [
"boost-date-time",
"boost-fusion",
"boost-optional",
"boost-preprocessor",
"boost-tuple"
]
},
"mysql": {
"description": "Build mysql backend",
"dependencies": [
"libmysql"
]
},
"odbc": {
"description": "Build odbc backend"
},
"postgresql": {
"description": "Build postgresql backend",
"dependencies": [
"libpq"
]
},
"sqlite3": {
"description": "Build sqlite3 backend",
"dependencies": [
"sqlite3"
]
}
}
}