]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/CMakeLists.txt
Organized api/internal into subdirs
[bamtools.git] / src / api / CMakeLists.txt
index 9ba99632bd4594d189e6d024232969eda8019045..d6a5b100a7de36e34a103cc7b965b94ecfee37be 100644 (file)
@@ -10,7 +10,7 @@ include_directories( ${BamTools_SOURCE_DIR}/src )
 
 # add compiler definitions 
 add_definitions( -DBAMTOOLS_API_LIBRARY ) # (for proper exporting of library symbols)
-add_definitions( -fPIC ) # (attempt to force PIC compiling on some archs)
+add_definitions( -fPIC ) # (attempt to force PIC compiling on CentOS, not being set on shared libs by CMake)
 
 # list of all BamTools API source (.cpp) files
 set( BamToolsAPISources
@@ -25,23 +25,31 @@ set( BamToolsAPISources
         SamReadGroupDictionary.cpp
         SamSequence.cpp
         SamSequenceDictionary.cpp
-        internal/BamHeader_p.cpp
-        internal/BamIndexFactory_p.cpp
-        internal/BamMultiReader_p.cpp
-        internal/BamRandomAccessController_p.cpp
-        internal/BamReader_p.cpp
-        internal/BamStandardIndex_p.cpp
-        internal/BamToolsIndex_p.cpp
-        internal/BamWriter_p.cpp
-        internal/BgzfStream_p.cpp
-        internal/SamFormatParser_p.cpp
-        internal/SamFormatPrinter_p.cpp
-        internal/SamHeaderValidator_p.cpp
+        internal/bam/BamHeader_p.cpp
+        internal/bam/BamMultiReader_p.cpp
+        internal/bam/BamRandomAccessController_p.cpp
+        internal/bam/BamReader_p.cpp
+        internal/bam/BamWriter_p.cpp
+        internal/index/BamIndexFactory_p.cpp
+        internal/index/BamStandardIndex_p.cpp
+        internal/index/BamToolsIndex_p.cpp
+        internal/io/BamDeviceFactory_p.cpp
+        internal/io/BamFile_p.cpp
+        internal/io/BamFtp_p.cpp
+        internal/io/BamHttp_p.cpp
+        internal/io/BamPipe_p.cpp
+        internal/io/BgzfStream_p.cpp
+        internal/io/ILocalIODevice_p.cpp
+        internal/io/IRemoteIODevice_p.cpp
+        internal/sam/SamFormatParser_p.cpp
+        internal/sam/SamFormatPrinter_p.cpp
+        internal/sam/SamHeaderValidator_p.cpp
+        internal/utils/BamException_p.cpp
 )
 
 # create main BamTools API shared library
 add_library( BamTools SHARED ${BamToolsAPISources} )
-set_target_properties( BamTools PROPERTIES SOVERSION "1.0.2" )
+set_target_properties( BamTools PROPERTIES SOVERSION "2.0.5" )
 set_target_properties( BamTools PROPERTIES OUTPUT_NAME "bamtools" )
 
 # create main BamTools API static library
@@ -54,13 +62,14 @@ target_link_libraries( BamTools z )
 target_link_libraries( BamTools-static z )
 
 # set library install destinations
-install( TARGETS BamTools LIBRARY DESTINATION "lib/bamtools")
+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})
@@ -68,6 +77,7 @@ 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})
@@ -76,3 +86,6 @@ ExportHeader(APIHeaders SamReadGroup.h           ${ApiIncludeDir})
 ExportHeader(APIHeaders SamReadGroupDictionary.h ${ApiIncludeDir})
 ExportHeader(APIHeaders SamSequence.h            ${ApiIncludeDir})
 ExportHeader(APIHeaders SamSequenceDictionary.h  ${ApiIncludeDir})
+
+set(AlgorithmsIncludeDir "api/algorithms")
+ExportHeader(AlgorithmsHeaders algorithms/Sort.h ${AlgorithmsIncludeDir})