apple pls

This commit is contained in:
EmosewaMC
2024-10-28 00:16:39 -07:00
parent 0509aaf855
commit bb143ccf21
4 changed files with 12 additions and 16 deletions

View File

@@ -22,16 +22,7 @@ if(MSVC)
add_dependencies(dCommonTests zlib_tests)
endif()
# Apple needs some special linkage for the mariadb connector for tests.
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})
endif()
DoAppleMariaDBCopy(dCommonTests ${CMAKE_CURRENT_BINARY_DIR})
# Link needed libraries
target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main)

View File

@@ -15,12 +15,7 @@ add_executable(dGameTests ${DGAMETEST_SOURCES})
add_dependencies(dGameTests conncpp_tests)
# Apple needs some special linkage for the mariadb connector for tests.
if(APPLE)
add_custom_command(TARGET dGameTests POST_BUILD
COMMAND install_name_tool ARGS -change libmariadbcpp.dylib @rpath/libmariadbcpp.dylib dGameTests
COMMAND otool ARGS -L dGameTests
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
endif()
DoAppleMariaDBCopy(dGameTests ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(dGameTests ${COMMON_LIBRARIES} GTest::gtest_main
dGame dScripts dPhysics Detour Recast tinyxml2 dWorldServer dZoneManager dChatFilter dNavigation)