Skip to content

Commit

Permalink
Set BUILD_RPATH
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Sep 3, 2023
1 parent 3be85b2 commit 893da3b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions matlab/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ if(MATLAB_BUILD_TESTS)
# targets.
target_link_libraries(placeholder_test GTest::gtest GTest::gtest_main)

# Ensure using GTest:gtest and GTest::gtest_main on macOS without
# specifying DYLD_LIBRARY_DIR.
set_target_properties(placeholder_test
PROPERTIES BUILD_RPATH
"$<TARGET_FILE_DIR:GTest::gtest>;$<TARGET_FILE_DIR:GTest::gtest_main>"
)

# Add test targets for C++ tests.
add_test(PlaceholderTestTarget placeholder_test)

Expand Down

0 comments on commit 893da3b

Please sign in to comment.