46
46
# Also, the following variables are set:
47
47
#
48
48
# - Xxx_FOUND
49
- # - Xxx_DEBUG_FOUND, Xxx_debug_FOUND -- (1)
50
- # - Xxx_RELEASE_FOUND, Xxx_release_FOUND -- (1)
49
+ # - Xxx_JDBC_FOUND, Xxx_jdbc_FOUND -- (1a)
50
+ # - Xxx_DEBUG_FOUND, Xxx_debug_FOUND -- (1b)
51
+ # - Xxx_RELEASE_FOUND, Xxx_release_FOUND -- (1b)
51
52
# - Xxx_VERSION, Xxx_VERSION_CC
52
53
# - Xxx_ROOT_DIR -- (2)
53
54
# - Xxx_RUNTIME_LIBRARY_DIRS, Xxx_RUNTIME_LIBRARY_DIR -- (2,3)
58
59
# In these variable names Xxx is either `MYSQL_CONCPP` or `mysql-concpp`,
59
60
# CC is version component: one of `MAJOR`, `MINOR` or `PATCH`.
60
61
#
61
- # Note (1): These are set to true if debug/release libraries are available
62
+ # Note (1a): Set to true if the classic JDBC connector libraries were found and
63
+ # the -jdbc targets are defined. It must be the case if `REQUIRE jdbc` clause
64
+ # was used in the cmake `find_package()` command.
65
+ #
66
+ # Note (1b): These are set to true if debug/release libraries are available
62
67
# (see below).
63
68
#
64
69
# Note (2): Set only in case of a monolithic install (TGZ, ZIP, MSI).
@@ -357,7 +362,11 @@ macro(main)
357
362
add_library (mysql::concpp${suffix} ALIAS mysql::concpp-xdevapi${suffix} )
358
363
endif ()
359
364
360
- endforeach ()
365
+ if (TARGET mysql::concpp-jdbc${suffix} )
366
+ set (MYSQL_CONCPP_JDBC_FOUND 1 )
367
+ endif ()
368
+
369
+ endforeach ()
361
370
362
371
363
372
# Build the NOT_FOUND message.
@@ -388,6 +397,7 @@ macro(main)
388
397
# Note: The _FOUND variable name expected by FPHSA for component CCC
389
398
# is mysql-concpp_CCC_FOUND
390
399
400
+ set (mysql-concpp_jdbc_FOUND ${MYSQL_CONCPP_JDBC_FOUND} )
391
401
set (mysql-concpp_debug_FOUND ${MYSQL_CONCPP_DEBUG_FOUND} )
392
402
set (mysql-concpp_release_FOUND ${MYSQL_CONCPP_RELEASE_FOUND} )
393
403
@@ -403,6 +413,7 @@ macro(main)
403
413
404
414
# Set alternative variables
405
415
416
+ set (MYSQL_CONCPP_jdbc_FOUND ${MYSQL_CONCPP_JDBC_FOUND} )
406
417
set (MYSQL_CONCPP_debug_FOUND ${MYSQL_CONCPP_DEBUG_FOUND} )
407
418
set (MYSQL_CONCPP_release_FOUND ${MYSQL_CONCPP_RELEASE_FOUND} )
408
419
@@ -412,6 +423,7 @@ macro(main)
412
423
RUNTIME_LIBRARY_DIR_DEBUG RUNTIME_LIBRARY_DIRS_DEBUG
413
424
RUNTIME_LIBRARY_DIR_RELEASE RUNTIME_LIBRARY_DIRS_RELEASE
414
425
DEBUG_FOUND debug_FOUND RELEASE_FOUND release_FOUND
426
+ JDBC_FOUND jdbc_FOUND
415
427
)
416
428
417
429
if (NOT DEFINED MYSQL_CONCPP_${var} )
0 commit comments