cmake: find MySQL client lib
This change introduces a CMake-style FindMySQL.cmake properly looking for libmysqlclient_r with mysql_config. This also fixes linking on some machines. Change-Id: Ifdbfdc3c7440dead37a8b63aaa86732d636aa0e2
This commit is contained in:
@ -3,7 +3,10 @@ set(SRCS
|
||||
BasicPruner.cc
|
||||
)
|
||||
|
||||
find_package(MySQL REQUIRED)
|
||||
include_directories(${MYSQL_INCLUDE_DIR})
|
||||
|
||||
## This is the example's campaign server distributing experiment parameters
|
||||
add_executable(prune-trace main.cc ${SRCS})
|
||||
target_link_libraries(prune-trace -lmysqlclient fail-util)
|
||||
target_link_libraries(prune-trace ${MYSQL_LIBRARIES} fail-util)
|
||||
install(TARGETS prune-trace RUNTIME DESTINATION bin)
|
||||
|
||||
Reference in New Issue
Block a user