diff --git a/ReadMe.md b/ReadMe.md index 7d3a48769774aa3bac1bf51fc0d80257e8683344..1d6292eb1edcdb2d5863055ca5f9dacb0f1b2dd7 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -96,8 +96,8 @@ To do that, execute make install ``` -as root and the shared libraries will be copied to `/usr/local/lib/<vision_utils>` directory -and the header files will be copied to `/usr/local/include/<vision_utils>` directory. At +as root and the shared libraries will be copied to `/usr/local/lib` directory +and the header files will be copied to `/usr/local/include/vision_utils` directory. At this point, the library may be used by any user. To remove the library from the system, exceute diff --git a/cmake_modules/Findvision_utils.cmake b/cmake_modules/Findvision_utils.cmake index b6e75119644b076ff69ca3943d90689be325577c..cda1ae42a330978fea7cb10ed65ef4a9097227ad 100644 --- a/cmake_modules/Findvision_utils.cmake +++ b/cmake_modules/Findvision_utils.cmake @@ -1,12 +1,17 @@ #edit the following line to add the librarie's header files FIND_PATH(vision_utils_INCLUDE_DIR vision_utils.h /usr/include/vision_utils /usr/local/include/vision_utils) +#change INCLUDE_DIRS to its parent directory +get_filename_component(vision_utils_INCLUDE_DIR ${vision_utils_INCLUDE_DIR} DIRECTORY) + FIND_LIBRARY(vision_utils_LIBRARY NAMES vision_utils - PATHS /usr/lib /usr/local/lib /usr/local/lib/vision_utils) + PATHS /usr/lib /usr/local/lib) IF (vision_utils_INCLUDE_DIR AND vision_utils_LIBRARY) SET(vision_utils_FOUND TRUE) + SET(vision_utils_INCLUDE_DIRS ${vision_utils_INCLUDE_DIR}) + SET(vision_utils_LIBRARIES ${vision_utils_LIBRARY}) ENDIF (vision_utils_INCLUDE_DIR AND vision_utils_LIBRARY) IF (vision_utils_FOUND) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 63a5d534f2271a441718123f59ff5b18c2a7ddc3..fec7f6834df0739ef485ff19b893e6ec3a928389 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -266,8 +266,8 @@ ENDIF (YAMLCPP_FOUND) # install INSTALL(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin - LIBRARY DESTINATION lib/${PROJECT_NAME} - ARCHIVE DESTINATION lib/${PROJECT_NAME}) + LIBRARY DESTINATION lib + ARCHIVE DESTINATION lib) INSTALL(FILES ${headers_main} DESTINATION include/${PROJECT_NAME}) INSTALL(FILES ${headers_com} DESTINATION include/${PROJECT_NAME}/common_class) INSTALL(FILES ${headers_sen} DESTINATION include/${PROJECT_NAME}/sensors)