]> git.donarmstrong.com Git - bamtools.git/blob - src/api/CMakeLists.txt
Added creation of include/ folder in bamtools root directory at build time.
[bamtools.git] / src / api / CMakeLists.txt
1 # ==========================
2 # BamTools CMakeLists.txt
3 # (c) 2010 Derek Barnett
4 #
5 # src/api/
6 # ==========================
7
8 # list include paths
9 include_directories( ${BamTools_SOURCE_DIR}/src )
10
11 # add compiler definitions 
12 add_definitions( -DBAMTOOLS_API_LIBRARY ) # (for proper exporting of library symbols)
13
14 # create main BamTools API library
15 add_library( BamTools SHARED
16              BamAlignment.cpp
17              BamIndex.cpp
18              BamMultiReader.cpp
19              BamReader.cpp
20              BamWriter.cpp
21              BGZF.cpp
22              internal/BamReader_p.cpp
23              internal/BamStandardIndex_p.cpp
24              internal/BamToolsIndex_p.cpp
25              internal/BamWriter_p.cpp
26            )
27
28 # link BamTools library with zlib automatically
29 target_link_libraries( BamTools z )
30
31 # set BamTools library properties
32 set_target_properties( BamTools PROPERTIES
33                        SOVERSION   0.9.0
34                        OUTPUT_NAME bamtools
35                      )
36
37 install( TARGETS BamTools LIBRARY DESTINATION "lib/bamtools")
38
39 # export API headers
40 include(../ExportHeader.cmake)
41 set(ApiIncludeDir "api")
42 ExportHeader(APIHeaders api_global.h     ${ApiIncludeDir})
43 ExportHeader(APIHeaders BamAlignment.h   ${ApiIncludeDir})
44 ExportHeader(APIHeaders BamAux.h         ${ApiIncludeDir})
45 ExportHeader(APIHeaders BamIndex.h       ${ApiIncludeDir})
46 ExportHeader(APIHeaders BamMultiReader.h ${ApiIncludeDir})
47 ExportHeader(APIHeaders BamReader.h      ${ApiIncludeDir})
48 ExportHeader(APIHeaders BamWriter.h      ${ApiIncludeDir})
49 ExportHeader(APIHeaders BGZF.h           ${ApiIncludeDir})