Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add contrib/mariadbclient #469

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ find_library(BOOSTPO_LIBRARY NAMES boost_program_options)
find_library(BOOSTSYSTEM_LIBRARY NAMES boost_system)
find_path(TCMALLOC_INCLUDE_DIR gperftools/heap-profiler.h)
find_library(TCMALLOC_LIBRARY NAMES tcmalloc_and_profiler)
find_path(MARIADBCLIENT_INCLUDE_DIR mysql/mysql.h)
find_library(MARIADBCLIENT_LIBRARY NAMES mysqlclient)
find_path(HIREDIS_INCLUDE_DIR hiredis/hiredis.h)
find_library(HIREDIS_LIBRARY NAMES hiredis)
find_path(GD_INCLUDE_DIR gd.h)
Expand All @@ -86,6 +88,9 @@ endif()
if(ZLIB_FOUND)
message(STATUS "found zlib")
endif()
if(MARIADBCLIENT_INCLUDE_DIR AND MARIADBCLIENT_LIBRARY)
message(STATUS "found mariadbclient")
endif()
if(HIREDIS_INCLUDE_DIR AND HIREDIS_LIBRARY)
message(STATUS "found hiredis")
endif()
Expand Down
6 changes: 6 additions & 0 deletions contrib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ else()
add_subdirectory(hiredis EXCLUDE_FROM_ALL)
endif()

if(MARIADBCLIENT_INCLUDE_DIR AND MARIADBCLIENT_LIBRARY)
add_subdirectory(mariadbclient)
else()
add_subdirectory(mariadbclient EXCLUDE_FROM_ALL)
endif()

if(THRIFT_COMPILER AND THRIFT_INCLUDE_DIR AND THRIFT_LIBRARY)
add_subdirectory(thrift)
else()
Expand Down
5 changes: 5 additions & 0 deletions contrib/mariadbclient/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
add_library(muduo_mariadbclient MariaDBClient.cc)
target_link_libraries(muduo_mariadbclient muduo_net mysqlclient)

add_executable(mmariadbclient mmariadbclient.cc)
target_link_libraries(mmariadbclient muduo_mariadbclient)
Loading