Skip to content

Commit

Permalink
more macos tinkering
Browse files Browse the repository at this point in the history
  • Loading branch information
jadebenn committed Apr 6, 2024
1 parent 1a05b02 commit 829ec35
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tests/dCommonTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,21 @@ 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()
#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)

# Link needed libraries
target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main)
target_link_libraries(dCommonTests ${COMMON_LIBRARIES} GTest::gtest_main MariaDB::ConnCpp)

# Copy test files to testing directory
add_subdirectory(TestBitStreams)
Expand Down

0 comments on commit 829ec35

Please sign in to comment.