From a028f34aaa839f37aa39e671efcc2b0dc3b5f35f Mon Sep 17 00:00:00 2001 From: Eric Cousineau Date: Thu, 2 May 2019 01:45:02 -0400 Subject: [PATCH] Address review comments Signed-off-by: Eric Cousineau --- CMakeLists.txt | 6 +++--- include/rcpputils/find_library.hpp | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ab241e..ea728fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,8 +50,8 @@ if(BUILD_TESTING) ament_add_gtest(test_find_library test/test_find_library.cpp) target_link_libraries(test_find_library ${PROJECT_NAME} toy_test_library) set_tests_properties(test_find_library PROPERTIES - ENVIRONMENT - "_TOY_TEST_LIBRARY_DIR=$;_TOY_TEST_LIBRARY=$") + ENVIRONMENT + "_TOY_TEST_LIBRARY_DIR=$;_TOY_TEST_LIBRARY=$") endif() ament_package() @@ -63,5 +63,5 @@ install( TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib - RUNTIME DESTINATION lib + RUNTIME DESTINATION bin ) diff --git a/include/rcpputils/find_library.hpp b/include/rcpputils/find_library.hpp index c712a2b..bad6cae 100644 --- a/include/rcpputils/find_library.hpp +++ b/include/rcpputils/find_library.hpp @@ -12,8 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. -#ifndef RCPPUTILS__FIND_LIBRARY_H_ -#define RCPPUTILS__FIND_LIBRARY_H_ +#ifndef RCPPUTILS__FIND_LIBRARY_HPP_ +#define RCPPUTILS__FIND_LIBRARY_HPP_ #include @@ -24,18 +24,19 @@ namespace rcpputils /// Finds a library located in the OS's specified environment variable for /// library paths and returns the absolute filesystem path, including the -/// appropriate prefix and extension. The environment variable and file format -/// per platform: -/// -/// * Linux: `${LD_LIBRARY_PATH}`, `lib{}.so` -/// * Apple: `${DYLD_LIBRARY_PATH}`, `lib{}.dyld` -/// * Windows: `%PATH%`, `{}.dll` +/// appropriate prefix and extension. /** + * The environment variable and file format per platform: + * * Linux: `${LD_LIBRARY_PATH}`, `lib{}.so` + * * Apple: `${DYLD_LIBRARY_PATH}`, `lib{}.dyld` + * * Windows: `%PATH%`, `{}.dll` + * * \param[in] library_name Name of the library to find. + * \return Absolute path of library. */ RCPPUTILS_PUBLIC std::string find_library_path(const std::string & library_name); } // namespace rcpputils -#endif // RCPPUTILS__FIND_LIBRARY_H_ +#endif // RCPPUTILS__FIND_LIBRARY_HPP_