60 lines
1.9 KiB
Diff
Executable file
60 lines
1.9 KiB
Diff
Executable file
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 0be0fb1..33565f5 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -393,7 +393,7 @@ ENDIF()
|
|
INCLUDE(${CC_SOURCE_DIR}/plugins/CMakeLists.txt)
|
|
ADD_SUBDIRECTORY(include)
|
|
ADD_SUBDIRECTORY(libmariadb)
|
|
-IF(NOT WIN32)
|
|
+IF(1)
|
|
ADD_SUBDIRECTORY(mariadb_config)
|
|
ENDIF()
|
|
|
|
diff --git a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt
|
|
index 70e619b..7a22fa1 100644
|
|
--- a/mariadb_config/CMakeLists.txt
|
|
+++ b/mariadb_config/CMakeLists.txt
|
|
@@ -30,6 +30,15 @@ IF(${rllength} GREATER 0)
|
|
LIST(REMOVE_DUPLICATES SYSTEM_LIBS)
|
|
ENDIF()
|
|
|
|
+set(REQUIRES_PRIVATE "" CACHE STRING "")
|
|
+if(WITH_SSL STREQUAL "OPENSSL")
|
|
+ list(REMOVE_ITEM SYSTEM_LIBS ${SSL_LIBRARIES})
|
|
+ string(APPEND REQUIRES_PRIVATE " openssl")
|
|
+endif()
|
|
+if(WITH_EXTERNAL_ZLIB)
|
|
+ string(APPEND REQUIRES_PRIVATE " zlib")
|
|
+endif()
|
|
+
|
|
FOREACH (LIB_NAME ${SYSTEM_LIBS})
|
|
GET_LIB_NAME(${LIB_NAME} LIB_OUT)
|
|
SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} ${LIB_OUT}")
|
|
@@ -50,6 +59,7 @@ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/mariadb_config.c.in
|
|
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/libmariadb.pc.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc @ONLY)
|
|
|
|
+if(0)
|
|
ADD_EXECUTABLE(mariadb_config ${CMAKE_CURRENT_BINARY_DIR}/mariadb_config.c)
|
|
|
|
IF(CMAKE_SYSTEM_NAME MATCHES AIX)
|
|
@@ -61,6 +71,7 @@ ENDIF()
|
|
INSTALL(TARGETS mariadb_config
|
|
DESTINATION "bin"
|
|
COMPONENT Development)
|
|
+endif()
|
|
|
|
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libmariadb.pc
|
|
DESTINATION "${INSTALL_PCDIR}"
|
|
diff --git a/mariadb_config/libmariadb.pc.in b/mariadb_config/libmariadb.pc.in
|
|
index 968181a..3f0410d 100644
|
|
--- a/mariadb_config/libmariadb.pc.in
|
|
+++ b/mariadb_config/libmariadb.pc.in
|
|
@@ -16,5 +16,6 @@ Description: MariaDB Connector/C dynamic library
|
|
Cflags: -I${includedir}
|
|
Libs: -L${libdir} -lmariadb
|
|
Libs.private: @extra_dynamic_LDFLAGS@
|
|
+Requires.private: @REQUIRES_PRIVATE@
|
|
|
|
|