How to install libgtest.so with catkin install?
I have some working end to end rostests built and installed like:
# builds the test executable against the first test file
add_rostest_gtest(test-end2end
bag_tests/MY_TEST.test
test/end2end_test.cpp
src/container_sub.cpp)
target_link_libraries(test-end2end ${catkin_LIBRARIES})
target_include_directories(test-end2end PRIVATE include)
If I build and run using default configuration catkin tools and rostest, it works as expected
catkin build end2end_testing --catkin-make-args tests
rostest end2end_testing MY_TEST.test --text
However, if I try and do the same in a workspace that has been configured with an install location:
catkin config --install
when I run the test, I get:
...test-end2end: error while loading shared libraries: libgtest.so: cannot open shared object file: No such file or directory
Searching the workspace I found that the unfound executable is in the build dir:
build/end2end_testing/gtest/googlemock/gtest/libgtest.so
So my question is: how can I have it included or at least accessed from, the install dir?
(I could just run my tests from devel, but I want the CI to test being built in install, including all the tests, so it doesn't have to build/install everything twice)
solution might be this https://answers.ros.org/question/8276...
need to investigate...