mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-05 18:24:12 +00:00
fix: use current binary directory mariadb shared object and dont override env variable (#1669)
* mac stuff grab correct mariadb file and dont override env variable fix for unix Update CMakeLists.txt unix only * get that dylib
This commit is contained in:
@@ -17,18 +17,13 @@ list(APPEND DCOMMONTEST_SOURCES ${DENUMS_TESTS})
|
||||
|
||||
# Set our executable
|
||||
add_executable(dCommonTests ${DCOMMONTEST_SOURCES})
|
||||
add_dependencies(dCommonTests conncpp_tests)
|
||||
|
||||
# Apple needs some special linkage for the mariadb connector for tests.
|
||||
# Needs to be in binary dir for ctest
|
||||
if(APPLE)
|
||||
add_custom_command(TARGET dCommonTests POST_BUILD
|
||||
COMMAND otool ARGS -l dCommonTests
|
||||
COMMAND otool ARGS -L dCommonTests
|
||||
COMMAND ls
|
||||
COMMAND otool ARGS -D libmariadbcpp.dylib
|
||||
COMMAND install_name_tool ARGS -change libmariadbcpp.dylib @rpath/libmariadbcpp.dylib dCommonTests
|
||||
COMMAND otool ARGS -L dCommonTests
|
||||
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
|
||||
add_custom_target(dCommonTestsLink
|
||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:MariaDB::ConnCpp> ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
add_dependencies(dCommonTests dCommonTestsLink)
|
||||
endif()
|
||||
|
||||
# Link needed libraries
|
||||
|
Reference in New Issue
Block a user