aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>2021-04-10 01:39:04 +0800
committerGitHub <noreply@github.com>2021-04-09 10:39:04 -0700
commitfe112d8301e13fde9a25dc92d94a0c4a6dc3cf19 (patch)
tree72c1117c6115d36407f52b15541a0b579be7fa62
parent9ab06a4def8adeab3121614d498c347ebf254967 (diff)
downloadvcpkg-fe112d8301e13fde9a25dc92d94a0c4a6dc3cf19.tar.gz
vcpkg-fe112d8301e13fde9a25dc92d94a0c4a6dc3cf19.zip
[soci] Re-fix feature mysql (#16369)
* [soci] Re-fix feature mysql * update version record * [soci] Fix config file name and add find_dependency * update baseline record * [soci] Export INTERFACE_INCLUDE_DIRECTORIES * update version record
-rw-r--r--ports/soci/export-include-dirs.patch53
-rw-r--r--ports/soci/fix-dependency-libmysql.patch5
-rw-r--r--ports/soci/portfile.cmake15
-rw-r--r--ports/soci/vcpkg.json4
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/s-/soci.json5
6 files changed, 76 insertions, 8 deletions
diff --git a/ports/soci/export-include-dirs.patch b/ports/soci/export-include-dirs.patch
new file mode 100644
index 000000000..907b54e77
--- /dev/null
+++ b/ports/soci/export-include-dirs.patch
@@ -0,0 +1,53 @@
+diff --git a/cmake/SociBackend.cmake b/cmake/SociBackend.cmake
+index 442d81d..ef56422 100644
+--- a/cmake/SociBackend.cmake
++++ b/cmake/SociBackend.cmake
+@@ -159,8 +159,13 @@ macro(soci_backend NAME)
+ ${THIS_BACKEND_HEADERS})
+
+ target_link_libraries(${THIS_BACKEND_TARGET}
++ PUBLIC
+ ${SOCI_CORE_TARGET}
+ ${THIS_BACKEND_DEPENDS_LIBRARIES})
++
++ target_include_directories(${THIS_BACKEND_TARGET}
++ PUBLIC
++ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS})
+
+ if(WIN32)
+ set_target_properties(${THIS_BACKEND_TARGET}
+@@ -197,8 +202,14 @@ macro(soci_backend NAME)
+
+ # Still need to link the libraries for tests to work
+ target_link_libraries (${THIS_BACKEND_TARGET_STATIC}
++ PUBLIC
+ ${THIS_BACKEND_DEPENDS_LIBRARIES}
+ )
++
++ target_include_directories(${THIS_BACKEND_TARGET_STATIC}
++ PUBLIC
++ ${THIS_BACKEND_DEPENDS_INCLUDE_DIRS}
++ )
+
+ set_target_properties(${THIS_BACKEND_TARGET_STATIC}
+ PROPERTIES
+diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
+index 3916cce..d537613 100644
+--- a/src/core/CMakeLists.txt
++++ b/src/core/CMakeLists.txt
+@@ -64,6 +64,7 @@ if (SOCI_SHARED)
+ target_include_directories(${SOCI_CORE_TARGET}
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
++ $<INSTALL_INTERFACE:include>
+ )
+
+ endif()
+@@ -96,6 +97,7 @@ if (SOCI_STATIC)
+ target_include_directories(${SOCI_CORE_TARGET_STATIC}
+ PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../../include>
++ $<INSTALL_INTERFACE:include>
+ )
+
+ endif()
diff --git a/ports/soci/fix-dependency-libmysql.patch b/ports/soci/fix-dependency-libmysql.patch
index b4d945d7e..809ec76d5 100644
--- a/ports/soci/fix-dependency-libmysql.patch
+++ b/ports/soci/fix-dependency-libmysql.patch
@@ -1,12 +1,13 @@
diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
-index 1233568..6110c36 100644
+index 1233568..9a7cb61 100644
--- a/cmake/modules/FindMySQL.cmake
+++ b/cmake/modules/FindMySQL.cmake
-@@ -13,6 +13,8 @@
+@@ -13,6 +13,9 @@
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+find_package(libmysql REQUIRED)
++set(MySQL_FOUND 1)
+return()
include(CheckCXXSourceCompiles)
diff --git a/ports/soci/portfile.cmake b/ports/soci/portfile.cmake
index b989b6f7c..153fc6887 100644
--- a/ports/soci/portfile.cmake
+++ b/ports/soci/portfile.cmake
@@ -4,7 +4,9 @@ vcpkg_from_github(
REF 334cc55d9fa7b42d7214a8533a246d637bc92899 #version 4.0.1 commit on 2020.10.19
SHA512 b300b13f68347d78252812e09efffb1735072cf5019940da53366a5cdee997f4b8b03a584a87a95ba764b0a78640ad6eb4966b53f9156280cb452465607afbc7
HEAD_REF master
- PATCHES fix-dependency-libmysql.patch
+ PATCHES
+ fix-dependency-libmysql.patch
+ export-include-dirs.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SOCI_DYNAMIC)
@@ -26,7 +28,7 @@ foreach(_feature IN LISTS ALL_FEATURES)
endif()
if(_feature MATCHES "mysql")
- set(MYSQL_OPT -DMYSQL_INCLUDE_DIR="${CURRENT_INSTALLED_DIR}/include/mysql")
+ set(MYSQL_OPT -DMYSQL_INCLUDE_DIR=${CURRENT_INSTALLED_DIR}/include/mysql)
endif()
endforeach()
@@ -51,7 +53,14 @@ vcpkg_install_cmake()
vcpkg_copy_pdbs()
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(RENAME ${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCI.cmake ${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCIConfig.cmake)
+
+if ("mysql" IN_LIST FEATURES)
+ vcpkg_replace_string(${CURRENT_PACKAGES_DIR}/share/${PORT}/SOCIConfig.cmake
+ "# Create imported target SOCI::soci_mysql"
+ "\ninclude(CMakeFindDependencyMacro)\nfind_dependency(libmysql)\n# Create imported target SOCI::soci_mysql"
+ )
+endif()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/debug/share)
diff --git a/ports/soci/vcpkg.json b/ports/soci/vcpkg.json
index 5014f3f0f..bb63ee5fc 100644
--- a/ports/soci/vcpkg.json
+++ b/ports/soci/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "soci",
- "version-string": "4.0.1",
- "port-version": 2,
+ "version": "4.0.1",
+ "port-version": 3,
"description": "SOCI database access library",
"homepage": "https://github.com/SOCI/soci",
"features": {
diff --git a/versions/baseline.json b/versions/baseline.json
index 3636db969..01b6dd47e 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -5614,7 +5614,7 @@
},
"soci": {
"baseline": "4.0.1",
- "port-version": 2
+ "port-version": 3
},
"socket-io-client": {
"baseline": "1.6.1-1",
diff --git a/versions/s-/soci.json b/versions/s-/soci.json
index c3dbe5478..2d9a73a00 100644
--- a/versions/s-/soci.json
+++ b/versions/s-/soci.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "05767aa636348d9fb5a2507a2c348091cc9d7782",
+ "version": "4.0.1",
+ "port-version": 3
+ },
+ {
"git-tree": "8127c6d88c6b673066ea41b061dd79d600c442d4",
"version-string": "4.0.1",
"port-version": 2