X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=CMakeLists.txt;fp=CMakeLists.txt;h=5af858ed52030254bf6d7052821cd00a473036b8;hb=4c9d2fdc9c556713531bdd2f25ce49685ab218e9;hp=0000000000000000000000000000000000000000;hpb=c5363861478f495b41a2ad99028326f85feeb905;p=bamtools.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..5af858e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,48 @@ +# ========================== +# 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 0) +set (BamTools_VERSION_MINOR 9) +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 +add_definitions (-Wall -O3 -D_FILE_OFFSET_BITS=64) + +# add our includes root path +include_directories (src) + +# list subdirectories to build in +add_subdirectory (src)