aboutsummaryrefslogtreecommitdiff
path: root/ports
diff options
context:
space:
mode:
Diffstat (limited to 'ports')
-rw-r--r--ports/soci/CONTROL5
-rw-r--r--ports/soci/portfile.cmake10
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)