1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
|
Author: Michael R. Crusoe <crusoe@ucdavis.edu>
Description: Use system copy of bamtools
--- transrate-tools.orig/CMakeLists.txt
+++ transrate-tools/CMakeLists.txt
@@ -19,11 +19,13 @@
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
-SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
+#SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
## Set the standard required compile flags
set (CMAKE_CXX_FLAGS "-fPIC -O3 -DHAVE_ANSI_TERM -DHAVE_SSTREAM -DHAVE_CONFIG_H -Wall -std=c++11")
-set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+#set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+
+find_package(bamtools REQUIRED)
##
# Record this top-level path
@@ -33,14 +35,14 @@
# Have CMake tell us what it's doing
set (CMAKE_VERBOSE_MAKEFILE true)
-if("${CMAKE_SYSTEM}" MATCHES "Linux")
- set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
-endif("${CMAKE_SYSTEM}" MATCHES "Linux")
+#if("${CMAKE_SYSTEM}" MATCHES "Linux")
+# set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
+#endif("${CMAKE_SYSTEM}" MATCHES "Linux")
if(APPLE)
find_package (ZLIB REQUIRED)
else()
- find_package (ZLIB REQUIRED STATIC)
+ find_package (ZLIB REQUIRED)
endif()
# Recurse into transrate-tools source directory
--- transrate-tools.orig/src/CMakeLists.txt
+++ transrate-tools/src/CMakeLists.txt
@@ -2,13 +2,9 @@
set(BAMREAD_HEADERS pileup.h segmenter.h)
-include_directories(${GAT_SOURCE_DIR}/bamtools/include)
-link_directories(${GAT_SOURCE_DIR}/bamtools/lib)
-
-set(LIBRARIES ${GAT_SOURCE_DIR}/bamtools/lib/libbamtools.a ${ZLIB_LIBRARIES})
+include_directories(${bamtools_INCLUDE_DIRS})
+set(LIBRARIES ${bamtools_LIBRARY})
add_executable(bam-read ${BAMREAD_SRCS} ${BAMREAD_HEADERS})
-set_target_properties(bam-read PROPERTIES LINK_SEARCH_START_STATIC 1)
-set_target_properties(bam-read PROPERTIES LINK_SEARCH_END_STATIC 1)
target_link_libraries(bam-read ${LIBRARIES})
--- transrate-tools.orig/src/bam-read.h
+++ transrate-tools/src/bam-read.h
@@ -3,7 +3,7 @@
#include <iostream>
#include <fstream>
#include <vector>
-#include "api/BamReader.h"
+#include "/usr/include/bamtools/api/BamReader.h"
#include "pileup.h"
using namespace BamTools;
--- transrate-tools.orig/src/pileup.h
+++ transrate-tools/src/pileup.h
@@ -2,7 +2,7 @@
#include <string>
#include <vector>
#include <math.h>
-#include "api/BamAlignment.h"
+#include "/usr/include/bamtools/api/BamAlignment.h"
#include "segmenter.h"
extern double nullprior;
|