[poco] Fixing target EXPAT::EXPAT is not found (#27711)

* [poco] Fixing target EXPAT::EXPAT is not found

* x-add-version

* Add new line
This commit is contained in:
Cheney Wang 2022-11-09 11:03:26 -08:00 committed by GitHub
parent 95e8384126
commit e9ffd9892f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 34 additions and 1 deletions

View File

@ -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

View File

@ -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)

4
ports/poco/usage Normal file
View File

@ -0,0 +1,4 @@
The package poco is compatible with built-in CMake targets:
find_package(Poco REQUIRED [COMPONENTS <libs>...])
target_link_libraries(main PRIVATE Poco::<libs>)

View File

@ -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",

View File

@ -5826,7 +5826,7 @@
},
"poco": {
"baseline": "1.12.4",
"port-version": 0
"port-version": 1
},
"podofo": {
"baseline": "0.9.8",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "530bf970e7d60959321669e6cd9e6bd4c6049313",
"version": "1.12.4",
"port-version": 1
},
{
"git-tree": "7f1f1e3470aab1d1f823d15ad50bd439af4125d8",
"version": "1.12.4",