vcpkg/ports/mysql-connector-cpp/export-targets.patch
Li Xiaobin 74a66f663d
[mysql-connector-cpp] update to 8.0.30 (#26536)
* [mysql-connector-cpp] Upgrade to 8.0.30

* version DB

* [mysql-connector-cpp] remove arm supports

* [mysql-connector-cpp] version DB
2022-09-02 10:51:42 -07:00

66 lines
2.2 KiB
Diff

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e734714..6f00595 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -397,7 +397,7 @@ add_subdirectory(devapi)
# Generate the main connector library.
merge_libraries(connector xapi devapi)
-target_include_directories(connector PUBLIC "${PROJECT_SOURCE_DIR}/include")
+target_include_directories(connector PRIVATE "${PROJECT_SOURCE_DIR}/include")
#
@@ -473,31 +473,23 @@ set_target_properties(connector PROPERTIES
)
-install(TARGETS connector
- CONFIGURATIONS Release RelWithDebInfo
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}" COMPONENT XDevAPIDev
- RUNTIME DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}" COMPONENT XDevAPIDll
-)
-
-install(TARGETS connector
- CONFIGURATIONS Debug
- ARCHIVE DESTINATION "${INSTALL_LIB_DIR_STATIC}/debug" COMPONENT XDevAPIDev
- RUNTIME DESTINATION "${INSTALL_LIB_DIR}/debug" COMPONENT XDevAPIDll
- LIBRARY DESTINATION "${INSTALL_LIB_DIR}/debug" COMPONENT XDevAPIDll
+install(TARGETS connector EXPORT unofficial-mysql-connector-cpp-targets
+ ARCHIVE DESTINATION lib COMPONENT XDevAPIDev
+ RUNTIME DESTINATION bin COMPONENT XDevAPIDll
+ LIBRARY DESTINATION lib COMPONENT XDevAPIDll
)
if(MSVC AND NOT BUILD_STATIC)
install(FILES $<TARGET_PDB_FILE:connector>
CONFIGURATIONS RelWithDebInfo
- DESTINATION "${INSTALL_LIB_DIR}"
+ DESTINATION bin
COMPONENT Debuginfo
)
install(FILES $<TARGET_PDB_FILE:connector>
CONFIGURATIONS Debug
- DESTINATION "${INSTALL_LIB_DIR}/debug"
+ DESTINATION bin
COMPONENT Debuginfo
)
@@ -604,3 +596,12 @@ endif()
show_config_options()
+
+include(CMakePackageConfigHelpers)
+configure_package_config_file(
+ "${CMAKE_SOURCE_DIR}/mysql-connector-cpp-config.cmake.in"
+ "${CMAKE_CURRENT_BINARY_DIR}/unofficial-mysql-connector-cpp-config.cmake"
+ INSTALL_DESTINATION "share/unofficial-mysql-connector-cpp"
+)
+install(FILES "${CMAKE_CURRENT_BINARY_DIR}/unofficial-mysql-connector-cpp-config.cmake" DESTINATION "share/unofficial-mysql-connector-cpp")
+install(EXPORT unofficial-mysql-connector-cpp-targets DESTINATION share/unofficial-mysql-connector-cpp)
\ No newline at end of file