2022-08-12 04:09:00 +08:00
|
|
|
@PACKAGE_INIT@
|
|
|
|
|
|
|
|
include(CMakeFindDependencyMacro)
|
2024-06-21 22:39:50 +02:00
|
|
|
find_dependency(Protobuf CONFIG)
|
2024-12-09 20:42:39 +01:00
|
|
|
if(NOT "@BUILD_SHARED_LIBS@")
|
|
|
|
find_dependency(Threads)
|
|
|
|
find_dependency(OpenSSL)
|
|
|
|
find_dependency(RapidJSON CONFIG)
|
|
|
|
find_dependency(ZLIB)
|
|
|
|
find_dependency(lz4)
|
|
|
|
find_dependency(zstd)
|
|
|
|
if("@WITH_JDBC@")
|
|
|
|
find_dependency(unofficial-libmysql)
|
|
|
|
endif()
|
|
|
|
endif()
|
2022-08-12 04:09:00 +08:00
|
|
|
|
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-mysql-connector-cpp-targets.cmake")
|
2024-12-09 20:42:39 +01:00
|
|
|
|
|
|
|
if(NOT UNOFFICIAL_MYSQL_CONNECTOR_CPP_INITIALIZED)
|
|
|
|
if(NOT "@BUILD_SHARED_LIBS@")
|
|
|
|
set_target_properties(unofficial::mysql-connector-cpp::connector PROPERTIES
|
|
|
|
INTERFACE_LINK_LIBRARIES "$<LINK_ONLY:Threads::Threads>;$<LINK_ONLY:OpenSSL::SSL>;$<LINK_ONLY:rapidjson>;$<LINK_ONLY:ZLIB::ZLIB>;$<LINK_ONLY:>;$<LINK_ONLY:lz4::lz4>;$<LINK_ONLY:zstd::libzstd>"
|
|
|
|
)
|
|
|
|
# Cf. mysql-concpp-config.cmake.in
|
|
|
|
if(WIN32)
|
|
|
|
set_property(TARGET unofficial::mysql-connector-cpp::connector APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dnsapi")
|
|
|
|
elseif(NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
set_property(TARGET unofficial::mysql-connector-cpp::connector APPEND PROPERTY INTERFACE_LINK_LIBRARIES "resolv;dl")
|
|
|
|
endif()
|
|
|
|
if("@WITH_JDBC@")
|
|
|
|
set_target_properties(unofficial::mysql-connector-cpp::connector-jdbc PROPERTIES
|
|
|
|
INTERFACE_LINK_LIBRARIES "$<LINK_ONLY:unofficial::libmysql::libmysql>"
|
|
|
|
)
|
|
|
|
# Cf. jdbc/driver/CMakeLists.txt
|
|
|
|
if(WIN32)
|
|
|
|
set_property(TARGET unofficial::mysql-connector-cpp::connector-jdbc APPEND PROPERTY INTERFACE_LINK_LIBRARIES "dnsapi")
|
|
|
|
elseif(NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
|
|
|
|
set_property(TARGET unofficial::mysql-connector-cpp::connector-jdbc APPEND PROPERTY INTERFACE_LINK_LIBRARIES "resolv;dl")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
set_property(TARGET unofficial::mysql-connector-cpp::connector APPEND PROPERTY
|
|
|
|
INTERFACE_LINK_LIBRARIES "$<LINK_ONLY:protobuf::libprotobuf-lite>"
|
|
|
|
)
|
|
|
|
set(UNOFFICIAL_MYSQL_CONNECTOR_CPP_INITIALIZED 1 CACHE INTERNAL "")
|
|
|
|
endif()
|
|
|
|
|
2022-08-12 04:09:00 +08:00
|
|
|
check_required_components(mysql-connector-cpp)
|