Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
copy samtools exe to bin directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Travis Abbott committed Oct 29, 2013
1 parent 9ccfa7a commit 1bd2363
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ set(TEST_DATA_DIRECTORY ${CMAKE_SOURCE_DIR}/test-data)
configure_file(test-data/TestData.hpp.in test-data/TestData.hpp @ONLY)
include_directories(${PROJECT_BINARY_DIR}/test-data)

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/test-bin)
enable_testing(true)
add_projects(test/lib)

Expand Down
3 changes: 1 addition & 2 deletions cmake/BuildBoost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 2.8)

include(ExternalProject)

#set(DEFAULT_BOOST_URL http://sourceforge.net/projects/boost/files/boost/1.54.0/boost_1_54_0.tar.gz)
set(DEFAULT_BOOST_URL ${CMAKE_SOURCE_DIR}/vendor/boost-1.54-breakdancer.tar.gz)
if(NOT DEFINED BOOST_URL)
set(BOOST_URL ${DEFAULT_BOOST_URL})
Expand All @@ -22,7 +21,7 @@ foreach(libname ${REQUIRED_BOOST_LIBS})
)
endforeach(libname ${REQUIRED_BOOST_LIBS})

message("Downloading boost from ${BOOST_URL}")
message("Extracting boost from ${BOOST_URL}")
message("Boost build log can be found at ${BOOST_LOG}")

ExternalProject_Add(
Expand Down
11 changes: 8 additions & 3 deletions cmake/BuildSamtools.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ cmake_minimum_required(VERSION 2.8)
include(ExternalProject)

set(SAMTOOLS_ROOT ${CMAKE_BINARY_DIR}/vendor/samtools)
set(SAMTOOLS_LIB ${SAMTOOLS_ROOT}/${CMAKE_FIND_LIBRARY_PREFIXES}bam${CMAKE_STATIC_LIBRARY_SUFFIX})
set(SAMTOOLS_BIN ${SAMTOOLS_ROOT}/samtools)

ExternalProject_Add(
samtools
samtools-0.1.19
URL ${CMAKE_SOURCE_DIR}/vendor/samtools-0.1.19.tar.gz
SOURCE_DIR ${SAMTOOLS_ROOT}
BINARY_DIR ${SAMTOOLS_ROOT}
CONFIGURE_COMMAND ""
BUILD_COMMAND make
INSTALL_COMMAND ""
INSTALL_COMMAND cp ${SAMTOOLS_ROOT}/samtools ${CMAKE_BINARY_DIR}/bin
)

add_library(bam STATIC IMPORTED)
set_property(TARGET bam PROPERTY IMPORTED_LOCATION ${SAMTOOLS_LIB})

set(Samtools_INCLUDE_DIRS ${SAMTOOLS_ROOT})
set(Samtools_LIBRARIES ${SAMTOOLS_ROOT}/${CMAKE_FIND_LIBRARY_PREFIXES}bam${CMAKE_STATIC_LIBRARY_SUFFIX} m z)
set(Samtools_LIBRARIES bam m z)

0 comments on commit 1bd2363

Please sign in to comment.