File: CMakeLists.txt

package info (click to toggle)
berkeley-express 1.5.3%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 3,764 kB
  • sloc: cpp: 4,785; sh: 65; makefile: 11
file content (75 lines) | stat: -rw-r--r-- 2,109 bytes parent folder | download | duplicates (2)
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
cmake_minimum_required (VERSION 2.6)

project(express)

set(${PROJECT_NAME}_VERSION_MAJOR 1)
set(${PROJECT_NAME}_VERSION_MINOR 5)
set(${PROJECT_NAME}_VERSION_PATCH 1)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

#set(CMAKE_CXX_FLAGS "-Wall")
#set(CMAKE_CXX_FLAGS_DEBUG "-g ${CMAKE_CXX_FLAGS}")
#set(CMAKE_CXX_FLAGS_RHDEBINFO "-O3 -g ${CMAKE_CXX_FLAGS}")
#set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os ${CMAKE_CXX_FLAGS}")

#set(CMAKE_BUILD_TYPE Release)
set(Boost_USE_STATIC_LIBS OFF)

find_package(Boost 1.39
    COMPONENTS
        thread
   	system
    	filesystem
    	program_options
    	date_time
    REQUIRED)

find_library(GPERFTOOLS_TCMALLOC_LIB tcmalloc)
if (GPERFTOOLS_TCMALLOC_LIB)
   message(STATUS "Found GPERFTOOLS_TCMALLOC: ${GPERFTOOLS_TCMALLOC_LIB}")
else (GPERFTOOLS_TCMALLOC_LIB)
   message(STATUS "Could NOT find GPERFTOOLS_TCMALLOC: Install to improve speed.")
endif(GPERFTOOLS_TCMALLOC_LIB)

find_package(Protobuf)
if (PROTOBUF_FOUND)
  include_directories(${Boost_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIR}
	  "/usr/include/bamtools") 
	set(PROTO_INT 1)
else (PROTOBUF_FOUND)
  include_directories(${Boost_INCLUDE_DIRS} "/usr/include/bamtools") 
	set(PROTO_INT 0)
endif(PROTOBUF_FOUND)

if(WIN32)
    if (EXISTS "${PROJECT_SOURCE_DIR}/bamtools/lib/libbamtools.lib")
      set(BAMTOOLS_LIBRARIES "${PROJECT_SOURCE_DIR}/bamtools/lib/libbamtools.lib")
    else()
      find_library(BAMTOOLS_LIBRARIES libbamtools.lib)
    endif()
	set(CMAKE_CXX_FLAGS "/EHsc")
	set(WIN32_INT 1)
else(WIN32)
    if (EXISTS "${PROJECT_SOURCE_DIR}/bamtools/lib/libbamtools.a")
      set(BAMTOOLS_LIBRARIES "${PROJECT_SOURCE_DIR}/bamtools/lib/libbamtools.a")
    else()
      # find_library(BAMTOOLS_LIBRARIES libbamtools.a)
      message(STATUS "Do not try to find libbamtools.a")
      set(BAMTOOLS_LIBRARIES bamtools)
    endif()
	set(WIN32_INT 0)
endif(WIN32)

if (NOT BAMTOOLS_LIBRARIES)
    message(FATAL_ERROR "Could not find libbamtools")
endif(NOT BAMTOOLS_LIBRARIES)

configure_file (
  "${PROJECT_SOURCE_DIR}/src/config.h.in"
  "${PROJECT_SOURCE_DIR}/src/config.h"
  )


add_subdirectory(src)