diff --git a/cmake/FindMariaDB.cmake b/cmake/FindMariaDB.cmake index 2a76e0aa..dc51f150 100644 --- a/cmake/FindMariaDB.cmake +++ b/cmake/FindMariaDB.cmake @@ -142,8 +142,7 @@ if(WIN32) IMPORTED_IMPLIB "${MARIADB_IMPLIB_LOCATION}") elseif(APPLE) set_target_properties(MariaDB::ConnCpp PROPERTIES - MACOSX_RPATH TRUE - INSTALL_NAME_DIR "@rpath") + IMPORTED_SONAME "libmariadbcpp") endif() # Add directories to include lists diff --git a/tests/dCommonTests/CMakeLists.txt b/tests/dCommonTests/CMakeLists.txt index 0d7e4436..6af0c56b 100644 --- a/tests/dCommonTests/CMakeLists.txt +++ b/tests/dCommonTests/CMakeLists.txt @@ -29,6 +29,9 @@ add_custom_command(TARGET dCommonTests POST_BUILD add_custom_command(TARGET dCommonTests POST_BUILD COMMAND ls WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) +add_custom_command(TARGET dCommonTests POST_BUILD + COMMAND otool ARGS -D libmariadbcpp.dylib + WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) endif() # Link needed libraries