Skip to content

Commit

Permalink
Merge pull request #928 from hkAlice/bs-stuff
Browse files Browse the repository at this point in the history
[3.x] (WIP) EncounterFight and state refactor;
  • Loading branch information
SapphireMordred authored Jan 4, 2025
2 parents 2c7b790 + 75edbdb commit f19d316
Show file tree
Hide file tree
Showing 202 changed files with 12,178 additions and 2,721 deletions.
21 changes: 16 additions & 5 deletions cmake/FindMySQL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,39 @@ if( UNIX )
"preferred path to MySQL (mysql_config)"
)

find_program(MYSQL_CONFIG mysql_config
# try mariadb first
find_program(MYSQL_CONFIG mariadb_config
${MYSQL_CONFIG_PREFER_PATH}
/usr/local/mysql/bin/
/usr/local/bin/
/usr/bin/
)

if( NOT MYSQL_CONFIG )
# fallback to mysql
find_program(MYSQL_CONFIG mysql_config
${MYSQL_CONFIG_PREFER_PATH}
/usr/local/mysql/bin/
/usr/local/bin/
/usr/bin/
)
endif()

if( MYSQL_CONFIG )
message(STATUS "Using mysql-config: ${MYSQL_CONFIG}")
# set INCLUDE_DIR
exec_program(${MYSQL_CONFIG}
ARGS --include
execute_process(COMMAND ${MYSQL_CONFIG} --include
OUTPUT_VARIABLE MY_TMP
OUTPUT_STRIP_TRAILING_WHITESPACE
)

string(REGEX REPLACE "-I([^ ]*)( .*)?" "\\1" MY_TMP "${MY_TMP}")
set(MYSQL_ADD_INCLUDE_PATH ${MY_TMP} CACHE FILEPATH INTERNAL)
#message("[DEBUG] MYSQL ADD_INCLUDE_PATH : ${MYSQL_ADD_INCLUDE_PATH}")
# set LIBRARY_DIR
exec_program(${MYSQL_CONFIG}
ARGS --libs_r
execute_process(COMMAND ${MYSQL_CONFIG} --libs_r
OUTPUT_VARIABLE MY_TMP
OUTPUT_STRIP_TRAILING_WHITESPACE
)
set(MYSQL_ADD_LIBRARIES "")
string(REGEX MATCHALL "-l[^ ]*" MYSQL_LIB_LIST "${MY_TMP}")
Expand Down
Loading

0 comments on commit f19d316

Please sign in to comment.