File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,17 @@ find_package_handle_standard_args(MySQL
130130 MYSQL_INCLUDE_DIRS)
131131# Copy the results to the output variables.
132132if (MySQL_FOUND)
133- add_library (MySQL_lib INTERFACE IMPORTED )
134- set_target_properties (MySQL_lib
135- PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
136- "${MYSQL_INCLUDE_DIRS} "
137- INTERFACE_LINK_LIBRARIES
138- "${MYSQL_LIBRARIES} " )
133+ add_library (MySQL_lib UNKNOWN IMPORTED )
134+ set_target_properties (MySQL_lib PROPERTIES
135+ INTERFACE_INCLUDE_DIRECTORIES "${MYSQL_INCLUDE_DIRS} "
136+ IMPORTED_LOCATION "${MYSQL_LIBRARIES} " )
137+ find_package (OpenSSL QUIET ) # try to find openssl
138+ if (OpenSSL_FOUND)
139+ target_link_libraries (MySQL_lib INTERFACE $<LINK_ONLY:OpenSSL::SSL> $<LINK_ONLY:OpenSSL::Crypto>)
140+ message (STATUS "mysql: OpenSSL found!" )
141+ else ()
142+ message (STATUS "mysql: OpenSSL missing!" )
143+ endif ()
139144else (MySQL_FOUND)
140145 set (MYSQL_LIBRARIES)
141146 set (MYSQL_INCLUDE_DIRS)
You can’t perform that action at this time.
0 commit comments