Skip to content

Commit 22106ef

Browse files
laurynas-biveinisinikep
authored andcommitted
Do not link MyRocks with librt on macOS (facebook#1221)
Summary: Same patch as https://github.com/percona/percona-server/pull/4808/files#diff-2acd82b249609d071929a6a0d083e36ef5b8807294bfe610e6552211c0c2b30e Pull Request resolved: facebook#1221 Reviewed By: luqun Differential Revision: D39201050 Pulled By: yoshinorim fbshipit-source-id: 991554b
1 parent ec9b279 commit 22106ef

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

storage/rocksdb/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,10 @@ IF (HAVE_ZLIB_H)
279279
SET(rocksdb_static_libs ${rocksdb_static_libs} ${ZLIB_LIBRARY})
280280
ENDIF()
281281

282-
SET(rocksdb_static_libs ${rocksdb_static_libs} "-lrt" "-ldl" "-lpthread")
282+
SET(rocksdb_static_libs ${rocksdb_static_libs} "-ldl" "-lpthread")
283+
IF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
284+
SET(rocksdb_static_libs ${rocksdb_static_libs} "-lrt")
285+
ENDIF()
283286

284287
MYSQL_ADD_PLUGIN(rocksdb_se ${ROCKSDB_SOURCES} STORAGE_ENGINE DEFAULT STATIC_ONLY
285288
LINK_LIBRARIES ${rocksdb_static_libs}

0 commit comments

Comments
 (0)