Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Cousineau <eric.cousineau@tri.global>
  • Loading branch information
EricCousineau-TRI committed May 2, 2019
1 parent 5e75d84 commit a028f34
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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=$<TARGET_FILE_DIR:toy_test_library>;_TOY_TEST_LIBRARY=$<TARGET_FILE:toy_test_library>")
ENVIRONMENT
"_TOY_TEST_LIBRARY_DIR=$<TARGET_FILE_DIR:toy_test_library>;_TOY_TEST_LIBRARY=$<TARGET_FILE:toy_test_library>")
endif()

ament_package()
Expand All @@ -63,5 +63,5 @@ install(
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib
RUNTIME DESTINATION bin
)
19 changes: 10 additions & 9 deletions include/rcpputils/find_library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <string>

Expand All @@ -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_

0 comments on commit a028f34

Please sign in to comment.