Skip to content

Commit 900e128

Browse files
committed
There is a hack to add "-lrt" to the output from "mysql_config --lib_r",
likely to compensate for a bug in "mysql_config" in some releases. Changed so it doesn't add "-lrt" on OS X where is no "librt".
1 parent 10bd0db commit 900e128

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

FindMySQL.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ ELSE (WIN32)
225225
IF (MYSQLCLIENT_STATIC_LINKING)
226226
_MYSQL_CONFIG_REPLACE(MYSQL_LIBRARIES
227227
"mysqlclient(_r| |$)" "${MYSQL_LIB}" "(^| )-l" "--libs_r")
228-
LIST(APPEND MYSQL_LIBRARIES "rt")
228+
IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
229+
LIST(APPEND MYSQL_LIBRARIES "rt")
230+
ENDIF ()
229231
ELSE (MYSQLCLIENT_STATIC_LINKING)
230232
_MYSQL_CONFIG(MYSQL_LIBRARIES "(^| )-l" "--libs_r")
231233
ENDIF (MYSQLCLIENT_STATIC_LINKING)

0 commit comments

Comments
 (0)