From e9ffd9892f14317b82aa76d5ff67cceab5650082 Mon Sep 17 00:00:00 2001 From: Cheney Wang <38240633+Cheney-W@users.noreply.github.com> Date: Wed, 9 Nov 2022 11:03:26 -0800 Subject: [PATCH] [poco] Fixing target EXPAT::EXPAT is not found (#27711) * [poco] Fixing target EXPAT::EXPAT is not found * x-add-version * Add new line --- ports/poco/0003-fix-dependency.patch | 22 ++++++++++++++++++++++ ports/poco/portfile.cmake | 1 + ports/poco/usage | 4 ++++ ports/poco/vcpkg.json | 1 + versions/baseline.json | 2 +- versions/p-/poco.json | 5 +++++ 6 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 ports/poco/usage diff --git a/ports/poco/0003-fix-dependency.patch b/ports/poco/0003-fix-dependency.patch index 394dad0f6a..946df4552b 100644 --- a/ports/poco/0003-fix-dependency.patch +++ b/ports/poco/0003-fix-dependency.patch @@ -146,6 +146,28 @@ index 3a176d7..d8055cb 100644 target_compile_definitions(DataSQLite PUBLIC POCO_UNBUNDLED SQLITE_THREADSAFE=1 +diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt +index 4fbf06f..793285a 100644 +--- a/XML/CMakeLists.txt ++++ b/XML/CMakeLists.txt +@@ -20,7 +20,7 @@ endif() + # If POCO_UNBUNDLED is enabled we try to find the required packages + # The configuration will fail if the packages are not found + if(POCO_UNBUNDLED) +- find_package(EXPAT REQUIRED) ++ find_package(expat CONFIG REQUIRED) + else() + POCO_SOURCES(SRCS expat + src/xmlparse.cpp +@@ -50,7 +50,7 @@ target_include_directories(XML + ) + + if(POCO_UNBUNDLED) +- target_link_libraries(XML PUBLIC EXPAT::EXPAT) ++ target_link_libraries(XML PUBLIC expat::expat) + target_compile_definitions(XML PUBLIC POCO_UNBUNDLED) + else() + if(WIN32) diff --git a/XML/cmake/PocoXMLConfig.cmake b/XML/cmake/PocoXMLConfig.cmake index ef58207..4ed94ec 100644 --- a/XML/cmake/PocoXMLConfig.cmake diff --git a/ports/poco/portfile.cmake b/ports/poco/portfile.cmake index bf0a19c161..69fc04c031 100644 --- a/ports/poco/portfile.cmake +++ b/ports/poco/portfile.cmake @@ -115,4 +115,5 @@ endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/poco/usage b/ports/poco/usage new file mode 100644 index 0000000000..9adb3444e3 --- /dev/null +++ b/ports/poco/usage @@ -0,0 +1,4 @@ +The package poco is compatible with built-in CMake targets: + + find_package(Poco REQUIRED [COMPONENTS ...]) + target_link_libraries(main PRIVATE Poco::) diff --git a/ports/poco/vcpkg.json b/ports/poco/vcpkg.json index 766fe96ead..1f1caed5bb 100644 --- a/ports/poco/vcpkg.json +++ b/ports/poco/vcpkg.json @@ -1,6 +1,7 @@ { "name": "poco", "version": "1.12.4", + "port-version": 1, "description": "Modern, powerful open source C++ class libraries for building network and internet-based applications that run on desktop, server, mobile and embedded systems.", "homepage": "https://github.com/pocoproject/poco", "license": "BSL-1.0", diff --git a/versions/baseline.json b/versions/baseline.json index cea14cb07d..0449c46579 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -5826,7 +5826,7 @@ }, "poco": { "baseline": "1.12.4", - "port-version": 0 + "port-version": 1 }, "podofo": { "baseline": "0.9.8", diff --git a/versions/p-/poco.json b/versions/p-/poco.json index d16076c445..5419a76af8 100644 --- a/versions/p-/poco.json +++ b/versions/p-/poco.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "530bf970e7d60959321669e6cd9e6bd4c6049313", + "version": "1.12.4", + "port-version": 1 + }, { "git-tree": "7f1f1e3470aab1d1f823d15ad50bd439af4125d8", "version": "1.12.4",