forked from pezmaster31/bamtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (40 loc) · 1.38 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# ==========================
# BamTools CMakeLists.txt
# (c) 2010 Derek Barnett
#
# top-level
# ==========================
# set project name
project( BamTools )
# Cmake requirements
cmake_minimum_required( VERSION 2.6.4 )
# Force the build directory to be different from source directory
macro( ENSURE_OUT_OF_SOURCE_BUILD MSG )
string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource )
get_filename_component( PARENTDIR ${CMAKE_SOURCE_DIR} PATH )
string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${PARENTDIR}" insourcesubdir )
IF( insource OR insourcesubdir )
message( FATAL_ERROR "${MSG}" )
ENDIF( insource OR insourcesubdir )
endmacro( ENSURE_OUT_OF_SOURCE_BUILD )
ensure_out_of_source_build( "
${PROJECT_NAME} requires an out of source build.
$ mkdir build
$ cd build
$ cmake ..
$ make
(or the Windows equivalent)\n" )
# set BamTools version information
set( BamTools_VERSION_MAJOR 2 )
set( BamTools_VERSION_MINOR 1 )
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" )
# define compiler flags for all code
set( CMAKE_BUILD_TYPE Release )
add_definitions( -Wall -D_FILE_OFFSET_BITS=64 )
# add our includes root path
include_directories( src )
# list subdirectories to build in
add_subdirectory( src )