From e143f22adafa82cfa3462869f0842f2acbdbdebb Mon Sep 17 00:00:00 2001 From: jadebenn Date: Sat, 6 Apr 2024 18:47:46 -0500 Subject: [PATCH] Revert "more macos tinkering" This reverts commit 829ec35b57983ad4444d90ab780fff95a8b47608. --- tests/dCommonTests/CMakeLists.txt | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/dCommonTests/CMakeLists.txt b/tests/dCommonTests/CMakeLists.txt index a20e4b6b..fadf43c4 100644 --- a/tests/dCommonTests/CMakeLists.txt +++ b/tests/dCommonTests/CMakeLists.txt @@ -20,21 +20,19 @@ add_executable(dCommonTests ${DCOMMONTEST_SOURCES}) add_dependencies(dCommonTests conncpp_tests) # 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_CURRENT_BINARY_DIR}) -#endif() - -#set_target_properties(libmariadbcpp PROPERTIES IMPORTED_LOCATION @rpath/libmariadbcpp.dylib) +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_CURRENT_BINARY_DIR}) +endif() # Link needed libraries -target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main MariaDB::ConnCpp) +target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main) # Copy test files to testing directory add_subdirectory(TestBitStreams)