]> git.proxmox.com Git - ceph.git/blame - ceph/src/jaegertracing/opentelemetry-cpp/tools/vcpkg/ports/poco/fix_dependency.patch
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / jaegertracing / opentelemetry-cpp / tools / vcpkg / ports / poco / fix_dependency.patch
CommitLineData
1e59de90
TL
1diff --git a/CMakeLists.txt b/CMakeLists.txt
2index b664afd..aafbf4a 100644
3--- a/CMakeLists.txt
4+++ b/CMakeLists.txt
5@@ -82,8 +82,6 @@ option(FORCE_OPENSSL "Force usage of OpenSSL even under windows" OFF)
6
7 if(ENABLE_CRYPTO OR ENABLE_NETSSL OR ENABLE_JWT)
8 find_package(OpenSSL REQUIRED)
9-else()
10- find_package(OpenSSL)
11 endif()
12
13 if(OPENSSL_FOUND)
14@@ -113,24 +111,19 @@ else()
15 option(ENABLE_APACHECONNECTOR "Enable ApacheConnector" OFF)
16 endif()
17
18-if(ENABLE_DATA_MYSQL)
19- find_package(MySQL REQUIRED)
20-else()
21- find_package(MySQL)
22-endif()
23+option(ENABLE_DATA "Enable Data" OFF)
24+option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
25
26-if(MYSQL_FOUND)
27- option(ENABLE_DATA "Enable Data" ON)
28- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" ON)
29-else()
30- option(ENABLE_DATA "Enable Data" OFF)
31- option(ENABLE_DATA_MYSQL "Enable Data MySQL or MariaDB" OFF)
32+if(ENABLE_DATA_MYSQL)
33+ find_package(libmysql)
34+ if (NOT libmysql_FOUND)
35+ find_package(unofficial-libmariadb CONFIG REQUIRED)
36+ set(MYSQL_LIBRARIES libmariadb)
37+ endif()
38 endif()
39
40 if(ENABLE_DATA_POSTGRESQL)
41 find_package(PostgreSQL REQUIRED)
42-else()
43- find_package(PostgreSQL)
44 endif()
45
46 if(PostgreSQL_FOUND)
47@@ -200,6 +193,9 @@ include(DefinePlatformSpecifc)
48 # Collect the built libraries and include dirs, the will be used to create the PocoConfig.cmake file
49 set(Poco_COMPONENTS "")
50
51+# Do not declare the link library in the code!
52+add_definitions(-DPOCO_NO_AUTOMATIC_LIBS)
53+
54 if(ENABLE_TESTS)
55 add_subdirectory(CppUnit)
56 set(ENABLE_XML ON CACHE BOOL "Enable XML" FORCE)
57@@ -327,8 +323,11 @@ if(EXISTS ${PROJECT_SOURCE_DIR}/Redis AND ENABLE_REDIS)
58 list(APPEND Poco_COMPONENTS "Redis")
59 endif()
60
61-if(EXISTS ${PROJECT_SOURCE_DIR}/PDF AND ENABLE_PDF)
62- add_subdirectory(PDF)
63+if(ENABLE_PDF)
64+ include(SelectLibraryConfigurations)
65+ find_library(PocoPDF_LIBRARY_RELEASE NAMES libhpdf)
66+ find_library(PocoPDF_LIBRARY_DEBUG NAMES libhpdfd)
67+ select_library_configurations(PocoPDF)
68 list(APPEND Poco_COMPONENTS "PDF")
69 endif()
70
71@@ -457,15 +456,6 @@ install(
72 Devel
73 )
74
75-if(POCO_UNBUNDLED)
76- install(FILES cmake/FindPCRE.cmake
77- DESTINATION "${PocoConfigPackageLocation}")
78- install(FILES cmake/V39/FindEXPAT.cmake
79- DESTINATION "${PocoConfigPackageLocation}/V39")
80- install(FILES cmake/V313/FindSQLite3.cmake
81- DESTINATION "${PocoConfigPackageLocation}/V313")
82-endif()
83-
84 message(STATUS "CMake ${CMAKE_VERSION} successfully configured ${PROJECT_NAME} using ${CMAKE_GENERATOR} generator")
85 message(STATUS "${PROJECT_NAME} package version: ${PROJECT_VERSION}")
86 if(BUILD_SHARED_LIBS)
87diff --git a/Data/CMakeLists.txt b/Data/CMakeLists.txt
88index 7d1e99e..9d0a85c 100644
89--- a/Data/CMakeLists.txt
90+++ b/Data/CMakeLists.txt
91@@ -45,7 +45,7 @@ else(ENABLE_DATA_SQLITE)
92 message(STATUS "SQLite Support Disabled")
93 endif()
94
95-if(MYSQL_FOUND AND ENABLE_DATA_MYSQL)
96+if((MYSQL_FOUND OR unofficial-libmariadb_FOUND) AND ENABLE_DATA_MYSQL)
97 message(STATUS "MySQL Support Enabled")
98 add_subdirectory(MySQL)
99 else()
100diff --git a/Data/MySQL/CMakeLists.txt b/Data/MySQL/CMakeLists.txt
101index f71b145..7034974 100644
102--- a/Data/MySQL/CMakeLists.txt
103+++ b/Data/MySQL/CMakeLists.txt
104@@ -21,7 +21,7 @@ set_target_properties(DataMySQL
105 DEFINE_SYMBOL MySQL_EXPORTS
106 )
107
108-target_link_libraries(DataMySQL PUBLIC Poco::Data MySQL::client)
109+target_link_libraries(DataMySQL PUBLIC Poco::Data ${MYSQL_LIBRARIES})
110 target_include_directories(DataMySQL
111 PUBLIC
112 $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
113diff --git a/Data/SQLite/CMakeLists.txt b/Data/SQLite/CMakeLists.txt
114index b52e2c5..0dcfae2 100644
115--- a/Data/SQLite/CMakeLists.txt
116+++ b/Data/SQLite/CMakeLists.txt
117@@ -7,7 +7,7 @@ file(GLOB_RECURSE HDRS_G "include/*.h")
118 POCO_HEADERS_AUTO(SQLITE_SRCS ${HDRS_G})
119
120 if(POCO_UNBUNDLED)
121- find_package(SQLite3 REQUIRED)
122+ find_package(unofficial-sqlite3 CONFIG REQUIRED)
123 else()
124 # sqlite3
125 POCO_SOURCES(SQLITE_SRCS sqlite3
126@@ -43,7 +43,7 @@ target_include_directories(DataSQLite
127 )
128
129 if(POCO_UNBUNDLED)
130- target_link_libraries(DataSQLite PUBLIC SQLite::SQLite3)
131+ target_link_libraries(DataSQLite PUBLIC unofficial::sqlite3::sqlite3)
132 target_compile_definitions(DataSQLite PUBLIC
133 POCO_UNBUNDLED
134 SQLITE_THREADSAFE=1
135diff --git a/Foundation/CMakeLists.txt b/Foundation/CMakeLists.txt
136index 6f5100f..c9fa2e5 100644
137--- a/Foundation/CMakeLists.txt
138+++ b/Foundation/CMakeLists.txt
139@@ -35,7 +35,7 @@ POCO_MESSAGES(SRCS Logging src/pocomsg.mc)
140 # If POCO_UNBUNDLED is enabled we try to find the required packages
141 # The configuration will fail if the packages are not found
142 if(POCO_UNBUNDLED)
143- find_package(PCRE REQUIRED)
144+ find_package(unofficial-pcre CONFIG REQUIRED)
145 find_package(ZLIB REQUIRED)
146
147 #HACK: Unicode.cpp requires functions from these files. The can't be taken from the library
148@@ -101,7 +101,7 @@ set_target_properties(Foundation
149 )
150
151 if(POCO_UNBUNDLED)
152- target_link_libraries(Foundation PUBLIC Pcre::Pcre ZLIB::ZLIB)
153+ target_link_libraries(Foundation PUBLIC unofficial::pcre::pcre ZLIB::ZLIB)
154 target_compile_definitions(Foundation PUBLIC POCO_UNBUNDLED)
155 add_definitions(
156 -D_pcre_utf8_table1=_poco_pcre_utf8_table1
157diff --git a/Foundation/cmake/PocoFoundationConfig.cmake b/Foundation/cmake/PocoFoundationConfig.cmake
158index 46c2d3f..af2e78c 100644
159--- a/Foundation/cmake/PocoFoundationConfig.cmake
160+++ b/Foundation/cmake/PocoFoundationConfig.cmake
161@@ -2,7 +2,7 @@ if(@POCO_UNBUNDLED@)
162 include(CMakeFindDependencyMacro)
163 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
164 find_dependency(ZLIB REQUIRED)
165- find_dependency(PCRE REQUIRED)
166+ find_dependency(unofficial-pcre REQUIRED)
167 endif()
168
169 include("${CMAKE_CURRENT_LIST_DIR}/PocoFoundationTargets.cmake")
170diff --git a/XML/CMakeLists.txt b/XML/CMakeLists.txt
171index 4fbf06f..793285a 100644
172--- a/XML/CMakeLists.txt
173+++ b/XML/CMakeLists.txt
174@@ -20,7 +20,7 @@ endif()
175 # If POCO_UNBUNDLED is enabled we try to find the required packages
176 # The configuration will fail if the packages are not found
177 if(POCO_UNBUNDLED)
178- find_package(EXPAT REQUIRED)
179+ find_package(expat CONFIG REQUIRED)
180 else()
181 POCO_SOURCES(SRCS expat
182 src/xmlparse.cpp
183@@ -50,7 +50,7 @@ target_include_directories(XML
184 )
185
186 if(POCO_UNBUNDLED)
187- target_link_libraries(XML PUBLIC EXPAT::EXPAT)
188+ target_link_libraries(XML PUBLIC expat::expat)
189 target_compile_definitions(XML PUBLIC POCO_UNBUNDLED)
190 else()
191 if(WIN32)
192diff --git a/XML/cmake/PocoXMLConfig.cmake b/XML/cmake/PocoXMLConfig.cmake
193index ef58207..4ed94ec 100644
194--- a/XML/cmake/PocoXMLConfig.cmake
195+++ b/XML/cmake/PocoXMLConfig.cmake
196@@ -4,7 +4,7 @@ if(@POCO_UNBUNDLED@)
197 if(CMAKE_VERSION VERSION_LESS "3.10")
198 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/V39")
199 endif()
200- find_dependency(EXPAT REQUIRED)
201+ find_dependency(expat CONFIG REQUIRED)
202 endif()
203
204 include("${CMAKE_CURRENT_LIST_DIR}/PocoXMLTargets.cmake")
205diff --git a/cmake/PocoConfig.cmake.in b/cmake/PocoConfig.cmake.in
206index 173eacd..936edf4 100644
207--- a/cmake/PocoConfig.cmake.in
208+++ b/cmake/PocoConfig.cmake.in
209@@ -8,6 +8,13 @@ if (NOT Poco_FIND_COMPONENTS)
210 return()
211 endif()
212
213+include(CMakeFindDependencyMacro)
214+find_dependency(ZLIB REQUIRED)
215+find_dependency(unofficial-pcre REQUIRED)
216+if(Poco_FIND_REQUIRED_XML)
217+ find_dependency(expat CONFIG REQUIRED)
218+endif()
219+
220 set(_Poco_FIND_PARTS_REQUIRED)
221 if (Poco_FIND_REQUIRED)
222 set(_Poco_FIND_PARTS_REQUIRED REQUIRED)
223@@ -23,7 +30,7 @@ set(_Poco_NOTFOUND_MESSAGE)
224
225 # Let components find each other, but don't overwrite CMAKE_PREFIX_PATH
226 set(_Poco_CMAKE_PREFIX_PATH_old ${CMAKE_PREFIX_PATH})
227-set(CMAKE_PREFIX_PATH ${_Poco_install_prefix})
228+set(CMAKE_PREFIX_PATH ${_Poco_install_prefix} ${CMAKE_PREFIX_PATH})
229
230 foreach(module ${Poco_FIND_COMPONENTS})
231 find_package(Poco${module}
232diff --git a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h
233index b533c9f..e2bb2d3 100644
234--- a/Data/MySQL/include/Poco/Data/MySQL/MySQL.h
235+++ b/Data/MySQL/include/Poco/Data/MySQL/MySQL.h
236@@ -54,7 +54,6 @@
237 #if !defined(MySQL_EXPORTS)
238 #pragma comment(lib, "PocoDataMySQL" POCO_LIB_SUFFIX)
239 #endif
240- #pragma comment(lib, "libmysql")
241 #endif
242
243