[med-svn] [bamtools] 03/05: remove custom ExportHeader function, use install instead

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 802bdde5213268c8a030430c4f6d99dcb4bc8419
Author: Dominique Belhachemi <domibel at debian.org>
Date:   Fri Oct 19 11:35:52 2012 -0400

    remove custom ExportHeader function, use install instead
    
    
    Gbp-Pq: Name 0003-remove-custom-ExportHeader-function-use-install-inst.patch
---
 src/CMakeLists.txt         |  5 +----
 src/ExportHeader.cmake     | 27 ---------------------------
 src/api/CMakeLists.txt     | 42 +++++++++++++++++++-----------------------
 src/toolkit/CMakeLists.txt |  3 +++
 4 files changed, 23 insertions(+), 54 deletions(-)

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 636bd62..3298ff9 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,7 +10,4 @@ add_subdirectory( api )
 add_subdirectory( toolkit )
 add_subdirectory( utils )
 
-# export shared headers
-include( ExportHeader.cmake )
-set( SharedIncludeDir "shared" )
-ExportHeader( SharedHeaders shared/bamtools_global.h ${SharedIncludeDir} )
+install( FILES shared/bamtools_global.h DESTINATION "include/bamtools/shared" COMPONENT Development )
diff --git a/src/ExportHeader.cmake b/src/ExportHeader.cmake
deleted file mode 100644
index ddfe410..0000000
--- a/src/ExportHeader.cmake
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# ExportHeader
-#
-
-function( ExportHeader MODULE FILE DEST )
-
-    # if haven't defined our custom 'build target'
-    # not exactly a build target, but lets this command get
-    # checked any time build step happens
-    if( NOT TARGET ${MODULE} )
-        add_custom_target( ${MODULE} ALL COMMENT "Exporting ${MODULE}" )
-    endif( NOT TARGET ${MODULE} )
-
-    # get the filename (without path)
-    get_filename_component( FILENAME "${FILE}" NAME )
-
-    # copy header to destination
-    add_custom_command( TARGET ${MODULE} COMMAND
-        ${CMAKE_COMMAND} -E copy_if_different
-        "${CMAKE_CURRENT_SOURCE_DIR}/${FILE}"
-        "${CMAKE_BINARY_DIR}/include/${DEST}/${FILENAME}" )
-
-    # make sure files are properly 'installed'
-    install( FILES "${FILE}" DESTINATION "include/bamtools/${DEST}" )
-
-endfunction( ExportHeader )
-
diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt
index 32edcff..91ce1a2 100644
--- a/src/api/CMakeLists.txt
+++ b/src/api/CMakeLists.txt
@@ -57,27 +57,23 @@ target_link_libraries( BamTools-static ${APILibs} )
 install( TARGETS BamTools        LIBRARY DESTINATION "lib/bamtools" RUNTIME DESTINATION "bin")
 install( TARGETS BamTools-static ARCHIVE DESTINATION "lib/bamtools")
 
-# export API headers
-include(../ExportHeader.cmake)
-set(ApiIncludeDir "api")
-ExportHeader(APIHeaders api_global.h             ${ApiIncludeDir})
-ExportHeader(APIHeaders BamAlgorithms.h          ${ApiIncludeDir})
-ExportHeader(APIHeaders BamAlignment.h           ${ApiIncludeDir})
-ExportHeader(APIHeaders BamAux.h                 ${ApiIncludeDir})
-ExportHeader(APIHeaders BamConstants.h           ${ApiIncludeDir})
-ExportHeader(APIHeaders BamIndex.h               ${ApiIncludeDir})
-ExportHeader(APIHeaders BamMultiReader.h         ${ApiIncludeDir})
-ExportHeader(APIHeaders BamReader.h              ${ApiIncludeDir})
-ExportHeader(APIHeaders BamWriter.h              ${ApiIncludeDir})
-ExportHeader(APIHeaders IBamIODevice.h           ${ApiIncludeDir})
-ExportHeader(APIHeaders SamConstants.h           ${ApiIncludeDir})
-ExportHeader(APIHeaders SamHeader.h              ${ApiIncludeDir})
-ExportHeader(APIHeaders SamProgram.h             ${ApiIncludeDir})
-ExportHeader(APIHeaders SamProgramChain.h        ${ApiIncludeDir})
-ExportHeader(APIHeaders SamReadGroup.h           ${ApiIncludeDir})
-ExportHeader(APIHeaders SamReadGroupDictionary.h ${ApiIncludeDir})
-ExportHeader(APIHeaders SamSequence.h            ${ApiIncludeDir})
-ExportHeader(APIHeaders SamSequenceDictionary.h  ${ApiIncludeDir})
+install( FILES api_global.h              DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamAlgorithms.h           DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamAlignment.h            DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamAux.h                  DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamConstants.h            DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamIndex.h                DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamMultiReader.h          DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamReader.h               DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES BamWriter.h               DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES IBamIODevice.h            DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamConstants.h            DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamHeader.h               DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamProgram.h              DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamProgramChain.h         DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamReadGroup.h            DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamReadGroupDictionary.h  DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamSequence.h             DESTINATION "include/bamtools/api" COMPONENT Development )
+install( FILES SamSequenceDictionary.h   DESTINATION "include/bamtools/api" COMPONENT Development )
 
-set( AlgorithmsIncludeDir "api/algorithms" )
-ExportHeader( AlgorithmsHeaders algorithms/Sort.h ${AlgorithmsIncludeDir} )
+install( FILES algorithms/Sort.h         DESTINATION "include/bamtools/api/algorithms" COMPONENT Development )
diff --git a/src/toolkit/CMakeLists.txt b/src/toolkit/CMakeLists.txt
index e6a2da9..d4a221f 100644
--- a/src/toolkit/CMakeLists.txt
+++ b/src/toolkit/CMakeLists.txt
@@ -35,6 +35,9 @@ set_target_properties( bamtools_cmd PROPERTIES
                      )
 # make version info available in application
 configure_file( bamtools_version.h.in ${BamTools_BINARY_DIR}/include/bamtools_version.h )
+install( FILES ${BamTools_BINARY_DIR}/include/bamtools_version.h
+         DESTINATION "include/bamtools"
+         COMPONENT Development )
 
 # 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