2020-11-11 01:28:45 +08:00
|
|
|
diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt
|
2021-07-23 07:19:26 +08:00
|
|
|
index c109a20..e1fa3f1 100644
|
2020-11-11 01:28:45 +08:00
|
|
|
--- a/libmariadb/CMakeLists.txt
|
|
|
|
+++ b/libmariadb/CMakeLists.txt
|
2020-12-01 02:36:22 +08:00
|
|
|
@@ -405,6 +405,7 @@ ELSE()
|
2021-11-18 07:33:26 +08:00
|
|
|
ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} mariadbclient.def)
|
2020-12-01 02:36:22 +08:00
|
|
|
SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C)
|
|
|
|
ENDIF()
|
|
|
|
+TARGET_INCLUDE_DIRECTORIES(libmariadb PUBLIC $<INSTALL_INTERFACE:include/mysql>)
|
|
|
|
|
|
|
|
TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE ${SYSTEM_LIBS})
|
|
|
|
|
2021-11-18 07:33:26 +08:00
|
|
|
@@ -453,13 +454,30 @@ ENDIF()
|
2020-11-13 02:22:36 +08:00
|
|
|
|
|
|
|
INSTALL(TARGETS mariadbclient
|
|
|
|
COMPONENT Development
|
|
|
|
+ EXPORT unofficial-libmariadb-targets
|
2020-11-11 01:28:45 +08:00
|
|
|
LIBRARY DESTINATION lib)
|
|
|
|
INSTALL(TARGETS libmariadb
|
|
|
|
COMPONENT SharedLibraries
|
|
|
|
+ EXPORT unofficial-libmariadb-targets
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
ARCHIVE DESTINATION lib)
|
|
|
|
|
2021-11-18 07:33:26 +08:00
|
|
|
+install(EXPORT unofficial-libmariadb-targets
|
|
|
|
+ NAMESPACE unofficial::
|
|
|
|
+ DESTINATION share/unofficial-libmariadb
|
|
|
|
+)
|
2020-11-11 01:28:45 +08:00
|
|
|
+
|
2021-11-18 07:33:26 +08:00
|
|
|
+file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake.in"
|
2020-11-11 01:28:45 +08:00
|
|
|
+[[include(CMakeFindDependencyMacro)
|
|
|
|
+find_dependency(ZLIB)
|
2021-11-18 07:33:26 +08:00
|
|
|
+if("@WITH_SSL@" STREQUAL "OPENSSL")
|
|
|
|
+ find_dependency(OpenSSL)
|
|
|
|
+endif()
|
2020-11-11 01:28:45 +08:00
|
|
|
+include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libmariadb-targets.cmake")
|
|
|
|
+]])
|
2021-11-18 07:33:26 +08:00
|
|
|
+configure_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake" @ONLY)
|
2020-11-11 01:28:45 +08:00
|
|
|
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-libmariadb-config.cmake DESTINATION share/unofficial-libmariadb)
|
|
|
|
|
|
|
|
IF(0)
|
|
|
|
# On Windows, install PDB
|