pezmaster31/bamtools — Issue #31: Installation of libraries
Author: dawe
Created: 2012-02-01 08:55:22+00:00
State: open

Current installation procedure installs libraries (in particular shared objects) under /usr/local/lib/bamtools. The installer doesn't update the linker information (i.e. ldconfig under Linux or install_name_tool on OS X). The easiest solution is to install the library in standard path. See the patch attached:

$ git diff
diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt
index 1af7a7f..77a619c 100644
--- a/src/api/CMakeLists.txt
+++ b/src/api/CMakeLists.txt
@@ -54,8 +54,8 @@ target_link_libraries( BamTools ${APILibs} )
target_link_libraries( BamTools-static ${APILibs} )

# set library install destinations
-install( TARGETS BamTools LIBRARY DESTINATION "lib/bamtools" RUNTIME DESTINATION "bin")
-install( TARGETS BamTools-static ARCHIVE DESTINATION "lib/bamtools")
+install( TARGETS BamTools LIBRARY DESTINATION "lib" RUNTIME DESTINATION "bin")
+install( TARGETS BamTools-static ARCHIVE DESTINATION "lib")

# export API headers
include(../ExportHeader.cmake)