diff options
author | Dominique Belhachemi <domibel@debian.org> | 2012-10-19 11:35:52 -0400 |
---|---|---|
committer | Étienne Mollier <emollier@debian.org> | 2021-11-06 19:31:45 +0100 |
commit | 312335518e3e6b247c11f70c1ca2646f9828ee98 (patch) | |
tree | da0860eb3a38cf0b2a3813cd12f8bd5ad8f9c3cf | |
parent | 91143c24b44d6e88d4fa007d4b0f19517959c4d8 (diff) |
remove custom ExportHeader function, use install instead
Gbp-Pq: Name 0003-remove-custom-ExportHeader-function-use-install-inst.patch
-rw-r--r-- | src/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/ExportHeader.cmake | 27 | ||||
-rw-r--r-- | src/api/CMakeLists.txt | 42 |
3 files changed, 20 insertions, 53 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e8f8482..0df4f8b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,9 +11,7 @@ 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 ) # configure and install pkg-config file configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/bamtools.pc.in ${CMAKE_CURRENT_BINARY_DIR}/bamtools-1.pc @ONLY ) diff --git a/src/ExportHeader.cmake b/src/ExportHeader.cmake deleted file mode 100644 index d62a5bc..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_CURRENT_BINARY_DIR}/include/${DEST}/${FILENAME}" ) - - # make sure files are properly 'installed' - install( FILES "${FILE}" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/bamtools/${DEST}" ) - -endfunction( ExportHeader ) - diff --git a/src/api/CMakeLists.txt b/src/api/CMakeLists.txt index 1c2ab9a..0c71cb6 100644 --- a/src/api/CMakeLists.txt +++ b/src/api/CMakeLists.txt @@ -51,27 +51,23 @@ install( TARGETS BamTools LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" ) -# 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 ) |