Skip to content

Commit 1910449

Browse files
committed
Bundle jdbc dependencies only if static linking with
libmysqlclient Fix some CMAKE warnings. Change-Id: I3db2506a283310ad2b3fe3bdbca73eb0ed35e568
1 parent 467b9bb commit 1910449

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

jdbc/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ endif(jdbc_stand_alone)
8989
add_config_option(MYSQLCLIENT_STATIC_LINKING BOOL ADVANCED DEFAULT OFF "enable libmysqlclient static linking")
9090
add_config_option(MYSQLCLIENT_STATIC_BINDING BOOL ADVANCED DEFAULT ON "enable libmysqlclient static binding")
9191

92-
92+
if(BUNDLE_DEPENDENCIES AND NOT MYSQLCLIENT_STATIC_LINKING)
93+
message("Warning: When dynamic linking with libmysqlclient, BUNDLE_DEPENDENCIES will be turned off.")
94+
set(BUNDLE_DEPENDENCIES OFF)
95+
endif()
9396

9497
if(BUILD_STATIC)
9598
set(BUILD_SHARED_LIBS OFF)

jdbc/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ IF(MSBUILD)
5454
SET(MY_TARGET_LINK_LIBRARIES connector-jdbc)
5555
ELSEIF(NOT MSBUILD)
5656
SET(MY_TARGET_LINK_LIBRARIES connector-jdbc)
57-
ENDIF(WIN32)
57+
ENDIF()
5858

5959
if(NOT MYSQLCLIENT_STATIC_LINKING)
6060
list(APPEND MY_TARGET_LINK_LIBRARIES MySQL::client)

jdbc/test/framework/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ IF(WIN32)
7777
../common/stringutils.h
7878
../common/file.h
7979
)
80-
ENDIF(WIN32 AND NOT CLANG)
80+
ENDIF(WIN32)
8181

8282
ADD_LIBRARY(test_framework STATIC ${testframework_sources})
8383
SET_TARGET_PROPERTIES(test_framework PROPERTIES

0 commit comments

Comments
 (0)