diff --git a/CMakeLists.txt b/CMakeLists.txt index 1532cb1..4131186 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/BuildBoost.cmake b/cmake/BuildBoost.cmake index 299cc3a..fbc756a 100644 --- a/cmake/BuildBoost.cmake +++ b/cmake/BuildBoost.cmake @@ -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}) @@ -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( diff --git a/cmake/BuildSamtools.cmake b/cmake/BuildSamtools.cmake index 23e1ef6..ca33fd2 100644 --- a/cmake/BuildSamtools.cmake +++ b/cmake/BuildSamtools.cmake @@ -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)