diff --git a/ports/soci/export-include-dirs.patch b/ports/soci/export-include-dirs.patch new file mode 100644 index 0000000000..907b54e770 --- /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 + $ ++ $ + ) + + endif() +@@ -96,6 +97,7 @@ if (SOCI_STATIC) + target_include_directories(${SOCI_CORE_TARGET_STATIC} + PUBLIC + $ ++ $ + ) + + endif() diff --git a/ports/soci/fix-dependency-libmysql.patch b/ports/soci/fix-dependency-libmysql.patch index b4d945d7e1..809ec76d5b 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 b989b6f7ca..153fc68872 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 5014f3f0fe..bb63ee5fc6 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 3636db9691..01b6dd47e5 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 c3dbe5478f..2d9a73a002 100644 --- a/versions/s-/soci.json +++ b/versions/s-/soci.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "05767aa636348d9fb5a2507a2c348091cc9d7782", + "version": "4.0.1", + "port-version": 3 + }, { "git-tree": "8127c6d88c6b673066ea41b061dd79d600c442d4", "version-string": "4.0.1",