[med-svn] [bamtools] 02/05: support out-of-source build

Kevin Murray daube-guest at moszumanska.debian.org
Thu Sep 24 07:41:23 UTC 2015


This is an automated email from the git hooks/post-receive script.

daube-guest pushed a commit to branch patch-queue/master
in repository bamtools.

commit 3a5d7416ec2a7293c24269ce7c6d98af22bbf292
Author: Dominique Belhachemi <domibel at debian.org>
Date:   Fri Sep 21 11:16:28 2012 -0400

    support out-of-source build
    
    
    Gbp-Pq: Name 0002-support-out-of-source-build.patch
---
 CMakeLists.txt             | 5 +++--
 src/ExportHeader.cmake     | 2 +-
 src/toolkit/CMakeLists.txt | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index dade1e3..c4f5ab7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,8 +35,8 @@ set( BamTools_VERSION_MINOR 4 )
 set( BamTools_VERSION_BUILD 0 )
 
 # set our library and executable destination dirs
-set( EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/bin" )
-set( LIBRARY_OUTPUT_PATH    "${CMAKE_SOURCE_DIR}/lib" )
+set( EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin" )
+set( LIBRARY_OUTPUT_PATH    "${CMAKE_BINARY_DIR}/lib" )
 
 # define compiler flags for all code
 set( CMAKE_BUILD_TYPE Release )
@@ -60,6 +60,7 @@ endif()
 
 # add our includes root path
 include_directories( src )
+include_directories("${CMAKE_BINARY_DIR}/include")
 
 # list subdirectories to build in
 add_subdirectory( src )
diff --git a/src/ExportHeader.cmake b/src/ExportHeader.cmake
index ec62573..ddfe410 100644
--- a/src/ExportHeader.cmake
+++ b/src/ExportHeader.cmake
@@ -18,7 +18,7 @@ function( ExportHeader MODULE FILE DEST )
     add_custom_command( TARGET ${MODULE} COMMAND
         ${CMAKE_COMMAND} -E copy_if_different
         "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}"
-        "${CMAKE_SOURCE_DIR}/include/${DEST}/${FILENAME}" )
+        "${CMAKE_BINARY_DIR}/include/${DEST}/${FILENAME}" )
 
     # make sure files are properly 'installed'
     install( FILES "${FILE}" DESTINATION "include/bamtools/${DEST}" )
diff --git a/src/toolkit/CMakeLists.txt b/src/toolkit/CMakeLists.txt
index d074870..e6a2da9 100644
--- a/src/toolkit/CMakeLists.txt
+++ b/src/toolkit/CMakeLists.txt
@@ -34,7 +34,7 @@ set_target_properties( bamtools_cmd PROPERTIES
                        OUTPUT_NAME "bamtools"
                      )
 # make version info available in application
-configure_file( bamtools_version.h.in ${BamTools_SOURCE_DIR}/src/toolkit/bamtools_version.h )
+configure_file( bamtools_version.h.in ${BamTools_BINARY_DIR}/include/bamtools_version.h )
 
 # define libraries to link
 target_link_libraries( bamtools_cmd BamTools BamTools-utils jsoncpp )

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/bamtools.git



More information about the debian-med-commit mailing list