aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremexal-company <60569989+emexal-company@users.noreply.github.com>2021-01-17 04:43:54 +0100
committerGitHub <noreply@github.com>2021-01-16 19:43:54 -0800
commit9d1ffee0e1e3e92b5c515ccdb2205768c56eb0dd (patch)
treefd42b7cc2e6303afac9c7ec81d086c692a5afd38
parent58bf44e8b0cc12b3c60b007c022b610670f9ac5a (diff)
downloadvcpkg-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>
-rw-r--r--port_versions/baseline.json2
-rw-r--r--port_versions/s-/soci.json5
-rw-r--r--ports/soci/CONTROL5
-rw-r--r--ports/soci/portfile.cmake10
4 files changed, 19 insertions, 3 deletions
diff --git a/port_versions/baseline.json b/port_versions/baseline.json
index 49289eaac..966db7172 100644
--- a/port_versions/baseline.json
+++ b/port_versions/baseline.json
@@ -5342,7 +5342,7 @@
},
"soci": {
"baseline": "4.0.1",
- "port-version": 0
+ "port-version": 1
},
"socket-io-client": {
"baseline": "1.6.1-1",
diff --git a/port_versions/s-/soci.json b/port_versions/s-/soci.json
index 28f267948..c5e60bc53 100644
--- a/port_versions/s-/soci.json
+++ b/port_versions/s-/soci.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "b3715b7475ac7a9dd45c1d46c0f72b7c84f67c09",
+ "version-string": "4.0.1",
+ "port-version": 1
+ },
+ {
"git-tree": "f5e3d0da7cc2c6387fdd6b5e6ab13e1315e181c7",
"version-string": "4.0.1",
"port-version": 0
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)