Skip to content

Commit

Permalink
fix new MacOS CI
Browse files Browse the repository at this point in the history
  • Loading branch information
hggq committed Apr 29, 2024
1 parent 76f18d0 commit ff2bbd3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,18 @@ FIND_PATH(MYSQL_INCLUDE_DIR NAMES mysql.h
PATHS /usr/local/include/mysql /usr/include/mysql /usr/local/mysql/include /opt/homebrew/opt/mysql-client/include
)

if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
if (IS_DIRECTORY "/usr/local/mysql/include")
set(MYSQL_INCLUDE_DIR "/usr/local/mysql/include")
endif()

if (IS_DIRECTORY "/usr/local/opt/mysql-client/include")
set(MYSQL_INCLUDE_DIR "/usr/local/opt/mysql-client/include")
endif()

endif()


if(NOT MYSQL_INCLUDE_DIR)
message(STATUS "Could not find \"mysql.h\" from searching ")
endif()
Expand Down

0 comments on commit ff2bbd3

Please sign in to comment.