[SOCI] Add support for soci-mysql connector (#15577)

* Add support for soci-mysql connector

* Better fix to support soci-mysql connector

* SOCI Port-Version, mysql options

* Do not add the options several times

* Remove extra parenthesis

* [soci] Correct cmake config file name

* update baseline

Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
This commit is contained in:
emexal-company 2021-01-17 04:43:54 +01:00 committed by GitHub
parent 58bf44e8b0
commit 9d1ffee0e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 3 deletions

View File

@ -5342,7 +5342,7 @@
}, },
"soci": { "soci": {
"baseline": "4.0.1", "baseline": "4.0.1",
"port-version": 0 "port-version": 1
}, },
"socket-io-client": { "socket-io-client": {
"baseline": "1.6.1-1", "baseline": "1.6.1-1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "b3715b7475ac7a9dd45c1d46c0f72b7c84f67c09",
"version-string": "4.0.1",
"port-version": 1
},
{ {
"git-tree": "f5e3d0da7cc2c6387fdd6b5e6ab13e1315e181c7", "git-tree": "f5e3d0da7cc2c6387fdd6b5e6ab13e1315e181c7",
"version-string": "4.0.1", "version-string": "4.0.1",

View File

@ -1,5 +1,6 @@
Source: soci Source: soci
Version: 4.0.1 Version: 4.0.1
Port-Version: 1
Homepage: https://github.com/SOCI/soci Homepage: https://github.com/SOCI/soci
Description: SOCI database access library Description: SOCI database access library
@ -17,3 +18,7 @@ Description: Build postgresql backend
Feature: odbc Feature: odbc
Description: Build odbc backend Description: Build odbc backend
Feature: mysql
Build-Depends: libmysql
Description: Build mysql backend

View File

@ -23,6 +23,10 @@ foreach(_feature IN LISTS ALL_FEATURES)
else() else()
list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF") list(APPEND _COMPONENT_FLAGS "-DWITH_${_FEATURE}=OFF")
endif() endif()
if(_feature MATCHES "mysql")
set(MYSQL_OPT -DMYSQL_INCLUDE_DIR="${CURRENT_INSTALLED_DIR}/include/mysql")
endif()
endforeach() endforeach()
vcpkg_configure_cmake( vcpkg_configure_cmake(
@ -37,14 +41,16 @@ vcpkg_configure_cmake(
-DSOCI_SHARED=${SOCI_DYNAMIC} -DSOCI_SHARED=${SOCI_DYNAMIC}
${_COMPONENT_FLAGS} ${_COMPONENT_FLAGS}
-DWITH_MYSQL=OFF ${MYSQL_OPT}
-DWITH_ORACLE=OFF -DWITH_ORACLE=OFF
-DWITH_FIREBIRD=OFF -DWITH_FIREBIRD=OFF
-DWITH_DB2=OFF -DWITH_DB2=OFF
) )
vcpkg_install_cmake() vcpkg_install_cmake()
vcpkg_fixup_cmake_targets(CONFIG_PATH cmake TARGET_PATH share/SOCI) vcpkg_fixup_cmake_targets(CONFIG_PATH cmake)
# Correct the config file name
file(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCI.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCI-config.cmake)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)