mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 21:13:04 +08:00
[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:
parent
58bf44e8b0
commit
9d1ffee0e1
@ -5342,7 +5342,7 @@
|
||||
},
|
||||
"soci": {
|
||||
"baseline": "4.0.1",
|
||||
"port-version": 0
|
||||
"port-version": 1
|
||||
},
|
||||
"socket-io-client": {
|
||||
"baseline": "1.6.1-1",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "b3715b7475ac7a9dd45c1d46c0f72b7c84f67c09",
|
||||
"version-string": "4.0.1",
|
||||
"port-version": 1
|
||||
},
|
||||
{
|
||||
"git-tree": "f5e3d0da7cc2c6387fdd6b5e6ab13e1315e181c7",
|
||||
"version-string": "4.0.1",
|
||||
|
@ -1,5 +1,6 @@
|
||||
Source: soci
|
||||
Version: 4.0.1
|
||||
Port-Version: 1
|
||||
Homepage: https://github.com/SOCI/soci
|
||||
Description: SOCI database access library
|
||||
|
||||
@ -17,3 +18,7 @@ Description: Build postgresql backend
|
||||
|
||||
Feature: odbc
|
||||
Description: Build odbc backend
|
||||
|
||||
Feature: mysql
|
||||
Build-Depends: libmysql
|
||||
Description: Build mysql backend
|
||||
|
@ -23,6 +23,10 @@ foreach(_feature IN LISTS ALL_FEATURES)
|
||||
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_configure_cmake(
|
||||
@ -37,14 +41,16 @@ vcpkg_configure_cmake(
|
||||
-DSOCI_SHARED=${SOCI_DYNAMIC}
|
||||
${_COMPONENT_FLAGS}
|
||||
|
||||
-DWITH_MYSQL=OFF
|
||||
${MYSQL_OPT}
|
||||
-DWITH_ORACLE=OFF
|
||||
-DWITH_FIREBIRD=OFF
|
||||
-DWITH_DB2=OFF
|
||||
)
|
||||
|
||||
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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user