diff options
| author | emexal-company <60569989+emexal-company@users.noreply.github.com> | 2021-01-17 04:43:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-16 19:43:54 -0800 |
| commit | 9d1ffee0e1e3e92b5c515ccdb2205768c56eb0dd (patch) | |
| tree | fd42b7cc2e6303afac9c7ec81d086c692a5afd38 /ports | |
| parent | 58bf44e8b0cc12b3c60b007c022b610670f9ac5a (diff) | |
| download | vcpkg-9d1ffee0e1e3e92b5c515ccdb2205768c56eb0dd.tar.gz vcpkg-9d1ffee0e1e3e92b5c515ccdb2205768c56eb0dd.zip | |
[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>
Diffstat (limited to 'ports')
| -rw-r--r-- | ports/soci/CONTROL | 5 | ||||
| -rw-r--r-- | ports/soci/portfile.cmake | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/ports/soci/CONTROL b/ports/soci/CONTROL index f60240ee6..0a6a291bb 100644 --- a/ports/soci/CONTROL +++ b/ports/soci/CONTROL @@ -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 diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake index bed98237a..fcf9204a9 100644 --- a/ports/soci/portfile.cmake +++ b/ports/soci/portfile.cmake @@ -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) |
