forked from pjotrp/biolib
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
159 lines (132 loc) · 3.5 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
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# CMakeLists.txt root folder for BIOLIB (see http://biolib.open-bio.org/)
#
# Build everything:
#
# cmake .
#
# Conditionals:
#
# Build the libraries without language interfaces:
#
# cmake -DBUILD_LIBS:BOOLEAN=TRUE .
# cmake -DBUILD_DOCS:BOOLEAN=TRUE .
#
# Build the Ruby/Python/Perl interface and libraries:
#
# cmake -DBUILD_RUBY:BOOLEAN=TRUE .
# cmake -DBUILD_PYTHON:BOOLEAN=TRUE .
# cmake -DBUILD_PERL:BOOLEAN=TRUE .
#
# To build specific libraries, for example
#
# cmake -DSTADEN_LIB:BOOLEAN=TRUE
# cmake -DRQTL_LIB:BOOLEAN=TRUE
#
# See ./INSTALL for more information
cmake_minimum_required(VERSION 2.6)
project (BIOLIB)
ENABLE_TESTING()
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/tools/cmake-support/modules/")
message("CMake modules: ${CMAKE_MODULE_PATH}")
FIND_PACKAGE(GitSubmodule)
include(CheckIncludeFiles)
message("Building biolib:")
if(BUILD_ALL)
set(BUILD_RUBY TRUE)
set(BUILD_PERL TRUE)
set(BUILD_PYTHON TRUE)
endif(BUILD_ALL)
if(BUILD_RUBY)
message(" Ruby interface")
set(BUILD_LIBS TRUE)
endif(BUILD_RUBY)
if(BUILD_PYTHON)
message(" Python interface")
set(BUILD_LIBS TRUE)
endif(BUILD_PYTHON)
if(BUILD_PERL)
message(" Perl interface")
set(BUILD_LIBS TRUE)
endif(BUILD_PERL)
if(NOT BUILD_DOCS)
if(NOT BUILD_LIBS)
set(BUILD_LIBS TRUE)
message(" Building libraries only")
set(BUILD_RUBY TRUE)
message(" Ruby interface")
# set(BUILD_PYTHON TRUE)
# set(BUILD_PERL TRUE)
endif(NOT BUILD_LIBS)
endif(NOT BUILD_DOCS)
set(BLD_BIOLIB TRUE)
set(BLD_STADEN TRUE)
set(BLD_RQTL FALSE)
set(BLD_EXAMPLE TRUE)
IF(NOT CYGWIN)
set(BLD_AFFYIO TRUE)
ENDIF(NOT CYGWIN)
if (EXAMPLE_LIB)
set(BLD_STADEN FALSE)
set(BLD_RQTL FALSE)
set(BLD_AFFYIO FALSE)
set(BLD_EXAMPLE TRUE)
set(BLD_BIOLIB FALSE)
endif (EXAMPLE_LIB)
if (AFFYIO_LIB)
set(BLD_STADEN FALSE)
set(BLD_RQTL FALSE)
set(BLD_AFFYIO TRUE)
set(BLD_EXAMPLE FALSE)
set(BLD_BIOLIB FALSE)
endif (AFFYIO_LIB)
if (STADEN_LIB)
set(BLD_STADEN TRUE)
set(BLD_RQTL FALSE)
set(BLD_AFFYIO FALSE)
set(BLD_EXAMPLE FALSE)
set(BLD_BIOLIB FALSE)
endif (STADEN_LIB)
if (RQTL_LIB)
set(BLD_RQTL TRUE)
set(BLD_STADEN FALSE)
set(BLD_AFFYIO FALSE)
set(BLD_EXAMPLE FALSE)
set(BLD_BIOLIB FALSE)
endif (RQTL_LIB)
if (EXAMPLE_LIB)
set(BLD_RQTL FALSE)
set(BLD_STADEN FALSE)
set(BLD_AFFYIO FALSE)
set(BLD_EXAMPLE TRUE)
set(BLD_BIOLIB FALSE)
endif (EXAMPLE_LIB)
message(" Biolib libraries")
message(STATUS "Install Affyio ${BLD_AFFYIO}")
message(STATUS "Install Staden ${BLD_STADEN}")
message(STATUS "Install RQTL ${BLD_RQTL}")
message(STATUS "Install Example ${BLD_EXAMPLE}")
FIND_PACKAGE(Map)
# SET(CMAKE_BUILD_TYPE Debug) Release is on by default
if(DEBUG)
SET(CMAKE_BUILD_TYPE Debug)
else(DEBUG)
SET(CMAKE_BUILD_TYPE Release)
endif(DEBUG)
SET(DEFAULT_BUILD_SHARED_LIBS ON)
SET(BUILD_SHARED_LIBS ${DEFAULT_BUILD_SHARED_LIBS} CACHE BOOL "Building shared or static libraries")
# Documentation
if (BUILD_DOCS)
INCLUDE (APIDoc)
endif (BUILD_DOCS)
# Turn off chatty makefiles by default. To make them chatty again,
# call make with VERBOSE=1 like this:
#
# make VERBOSE=1
SET(CMAKE_VERBOSE_MAKEFILE OFF)
############################################################
# Set default search directory prefixes for third party libraries.
SET(THIRD_PARTY_LIBRARY_PATH "" CACHE PATH "Default search path for third-party libraries")
SET(THIRD_PARTY_INCLUDE_PATH "" CACHE PATH "Default search path for third-party headers")
add_subdirectory (src)
include(src)
FIND_PACKAGE(SystemInfo)