Commit 6cefe7d3 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: use predefined CMAKE_DL_LIBS

instead of, say, MY_SEARCH_LIBS(dlopen dl LIBDL)
parent 641f81ba
......@@ -17,7 +17,7 @@ MACRO (CHECK_JEMALLOC)
IF(WITH_JEMALLOC STREQUAL "static")
SET(libname jemalloc_pic)
SET(CMAKE_REQUIRED_LIBRARIES pthread dl m)
SET(CMAKE_REQUIRED_LIBRARIES pthread ${CMAKE_DL_LIBS} m)
SET(what bundled)
ELSE()
SET(libname jemalloc c)
......
......@@ -135,7 +135,7 @@ MACRO (MYSQL_CHECK_SSL)
SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBSOCKET})
ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${LIBDL})
SET(SSL_LIBRARIES ${SSL_LIBRARIES} ${CMAKE_DL_LIBS})
ENDIF()
MESSAGE_ONCE(OPENSSL_INCLUDE_DIR "OPENSSL_INCLUDE_DIR = ${OPENSSL_INCLUDE_DIR}")
......
......@@ -130,7 +130,6 @@ IF(UNIX)
MY_SEARCH_LIBS(bind "bind;socket" LIBBIND)
MY_SEARCH_LIBS(crypt crypt LIBCRYPT)
MY_SEARCH_LIBS(setsockopt socket LIBSOCKET)
MY_SEARCH_LIBS(dlopen dl LIBDL)
MY_SEARCH_LIBS(sched_yield rt LIBRT)
IF(NOT LIBRT)
MY_SEARCH_LIBS(clock_gettime rt LIBRT)
......@@ -138,7 +137,7 @@ IF(UNIX)
FIND_PACKAGE(Threads)
SET(CMAKE_REQUIRED_LIBRARIES
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
${LIBM} ${LIBNSL} ${LIBBIND} ${LIBCRYPT} ${LIBSOCKET} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBEXECINFO})
# Need explicit pthread for gcc -fsanitize=address
IF(CMAKE_USE_PTHREADS_INIT AND CMAKE_C_FLAGS MATCHES "-fsanitize=")
SET(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} pthread)
......
......@@ -148,7 +148,7 @@ ENDIF()
SET(LIBS
dbug strings mysys mysys_ssl pcre vio
${ZLIB_LIBRARY} ${SSL_LIBRARIES}
${LIBWRAP} ${LIBCRYPT} ${LIBDL}
${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS}
${MYSQLD_STATIC_PLUGIN_LIBS}
sql_embedded
)
......
......@@ -24,7 +24,7 @@ ENDIF()
IF(WITH_WSREP)
ADD_EXECUTABLE(wsrep_check_version wsrep_check_version.c)
TARGET_LINK_LIBRARIES(wsrep_check_version ${LIBDL})
TARGET_LINK_LIBRARIES(wsrep_check_version ${CMAKE_DL_LIBS})
ENDIF()
IF(NOT INSTALL_MYSQLTESTDIR)
......
......@@ -75,7 +75,7 @@ ENDIF()
ADD_CONVENIENCE_LIBRARY(mysys ${MYSYS_SOURCES})
TARGET_LINK_LIBRARIES(mysys dbug strings ${ZLIB_LIBRARY}
${LIBNSL} ${LIBM} ${LIBRT} ${LIBDL} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY})
${LIBNSL} ${LIBM} ${LIBRT} ${CMAKE_DL_LIBS} ${LIBSOCKET} ${LIBEXECINFO} ${CRC32_LIBRARY})
DTRACE_INSTRUMENT(mysys)
IF(HAVE_BFD_H)
......
......@@ -167,7 +167,7 @@ ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
DTRACE_INSTRUMENT(sql)
TARGET_LINK_LIBRARIES(sql ${MYSQLD_STATIC_PLUGIN_LIBS}
mysys mysys_ssl dbug strings vio pcre
${LIBWRAP} ${LIBCRYPT} ${LIBDL} ${CMAKE_THREAD_LIBS_INIT}
${LIBWRAP} ${LIBCRYPT} ${CMAKE_DL_LIBS} ${CMAKE_THREAD_LIBS_INIT}
${WSREP_LIB}
${SSL_LIBRARIES}
${LIBSYSTEMD})
......
......@@ -240,7 +240,6 @@ include(build/ac_macros/check_functions.m4)
ac_check_symbols(fpclassify math.h)
ac_check_lib(m fpclassify)
ac_check_lib(dl dlopen)
ac_check_lib(execinfo backtrace)
if(HAVE_LIBEXECINFO)
set(HAVE_BACKTRACE TRUE)
......
......@@ -97,7 +97,7 @@ set(GRN_ALL_LIBRARIES
${LZ4_LIBS}
${LIBZSTD_LIBS}
${MESSAGE_PACK_LIBS}
${DL_LIBS}
${CMAKE_DL_LIBS}
${M_LIBS}
${WS2_32_LIBS}
${MRUBY_LIBS}
......
......@@ -160,7 +160,7 @@ find_package(Threads REQUIRED)
if(WIN32)
set(SYSTEM_LIBS ${SYSTEM_LIBS} Shlwapi.lib Rpcrt4.lib)
else()
set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${LIBDL})
set(SYSTEM_LIBS ${CMAKE_THREAD_LIBS_INIT} ${LIBRT} ${CMAKE_DL_LIBS})
endif()
set(ROCKSDB_LIBS rocksdblib})
......
......@@ -23,4 +23,4 @@ ADD_CONVENIENCE_LIBRARY(wsrep ${WSREP_SOURCES})
DTRACE_INSTRUMENT(wsrep)
#ADD_EXECUTABLE(listener wsrep_listener.c ${WSREP_SOURCES})
#TARGET_LINK_LIBRARIES(listener ${LIBDL})
#TARGET_LINK_LIBRARIES(listener ${CMAKE_DL_LIBS})
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment