Skip to content

Instantly share code, notes, and snippets.

@joeke80215
Created November 12, 2019 14:41
Show Gist options
  • Save joeke80215/a5d47cc6b07103e4523013edca094eb8 to your computer and use it in GitHub Desktop.
Save joeke80215/a5d47cc6b07103e4523013edca094eb8 to your computer and use it in GitHub Desktop.
macOS cmake with mysql client
cmake_minimum_required(VERSION 3.15)
project(msyql_exec_client C)
set(CMAKE_C_STANDARD 99)
add_executable(msyql_exec_client main.c /usr/local/Cellar/mysql-connector-c/6.1.11/bin)
include_directories(/usr/local/Cellar/mysql-connector-c/6.1.11/include)
find_library(MYSQL_CLIENT mysqlclient /usr/local/Cellar/mysql-connector-c/6.1.11/lib)
target_link_libraries(msyql_exec_client LINK_PUBLIC ${MYSQL_CLIENT})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment