From: Mateusz Kijowski Date: Mon, 20 Jan 2014 21:42:40 +0100 Subject: explicitly link libm --- CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5da3828..0a6f7e7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,7 @@ find_package(MySQL) find_package(ZLIB) find_package(GLIB2) find_package(PCRE) +find_library(M_LIB m) option(BUILD_DOCS "Build the documentation" ON) @@ -29,17 +30,15 @@ MARK_AS_ADVANCED(CMAKE) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/config.h) - if (WITH_BINLOG) add_executable(mydumper mydumper.c binlog.c server_detect.c g_unix_signal.c) else (WITH_BINLOG) add_executable(mydumper mydumper.c server_detect.c g_unix_signal.c) endif (WITH_BINLOG) -target_link_libraries(mydumper ${MYSQL_LIBRARIES} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES}) - +target_link_libraries(mydumper ${MYSQL_LIBRARIES} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES} ${M_LIB}) add_executable(myloader myloader.c) -target_link_libraries(myloader ${MYSQL_LIBRARIES} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES}) +target_link_libraries(myloader ${MYSQL_LIBRARIES} ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES} ${PCRE_PCRE_LIBRARY} ${ZLIB_LIBRARIES} ${M_LIB}) INSTALL(TARGETS mydumper myloader RUNTIME DESTINATION bin