File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ add_library(otel_api INTERFACE)
154
154
if (NOT (WIN32 OR APPLE OR CMAKE_SYSTEM_NAME MATCHES "SunOS" ))
155
155
message (STATUS "Adding OTel support" )
156
156
set (TELEMETRY ON )
157
- target_include_directories (otel_api INTERFACE
157
+ target_include_directories (otel_api INTERFACE
158
158
"${PROJECT_SOURCE_DIR} /extra/otel/opentelemetry-cpp-1.8.3/api/include"
159
159
)
160
160
target_compile_definitions (otel_api INTERFACE TELEMETRY )
@@ -257,6 +257,25 @@ set(INFO_PREFIX "jdbc-")
257
257
merge_libraries (connector-jdbc jdbc )
258
258
259
259
260
+ # Note: When connector links statically to the client library, targets using
261
+ # the connector must be able to find dependencies of the client library, such
262
+ # as openssl libs. The MYSQL_EXTERNAL_SEARCHPATH variable set by DepFindMySQL.
263
+ # cmake stores detected locations where client library dependencies that
264
+ # are bundled with it can be found. We add it here as interface property
265
+ # so that other targets that link with the connector will have library search
266
+ # path correctly set in the compile line.
267
+ #
268
+ # TODO: Modify merge_libraries() logic to autmatically detect transitive link
269
+ # directory path properties of merged targets and then set them on the merged
270
+ # library target.
271
+
272
+ if (MYSQLCLIENT_STATIC_LINKING )
273
+ target_link_directories (connector-jdbc INTERFACE
274
+ ${MYSQL_EXTERNAL_SEARCHPATH}
275
+ )
276
+ endif ()
277
+
278
+
260
279
#
261
280
# Install specifications
262
281
# ----------------------
You can’t perform that action at this time.
0 commit comments