Advertisement
Agus_Darmawan

cmake for connection c to mysql

Jan 12th, 2020
1,361
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 3.14)
  2. project(percobaan_pertama C)
  3.  
  4. set(CMAKE_C_STANDARD 11)
  5.  
  6. LINK_DIRECTORIES("C:\\Program Files\\MySQL\\MySQL Connector C 6.1\\include")
  7. include_directories("C:\\Program Files\\MySQL\\MySQL Connector C 6.1\\include")
  8.  
  9. add_executable(percobaan_pertama main.c)
  10.  
  11. LINK_DIRECTORIES("C:\\Program Files\\MySQL\\MySQL Connector C 6.1\\lib")
  12. # kalau di dev-c pakenya -l libmysql
  13. target_link_libraries(percobaan_pertama "C:\\Program Files\\MySQL\\MySQL Connector C 6.1\\lib\\libmysql.lib")
Advertisement
RAW Paste Data Copied
Advertisement