~ubuntu-branches/ubuntu/trusty/cclive/trusty-proposed

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Bazaar Package Importer
  • Author(s): Alejandro Garrido Mota
  • Date: 2011-03-07 14:37:59 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20110307143759-abieei4gsctde1zo
Tags: 0.7.3.1-1
* New upstream release (Closes: #608393, #588795) 
* Remove patch: The changes was included by upstream author.
* Remove two white lines in d/rules 
* d/copyright: Update Copyright years to 2009,2011 

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 
9
9
# Version.
10
10
 
11
 
set (VERSION "0.7.0.1")
 
11
set (VERSION "0.7.3.1")
12
12
set (VERSION_LONG "${VERSION}")
13
 
set (BRANCH "0.7.0")
 
13
set (BRANCH "master")
14
14
 
15
15
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git")
16
16
    find_program (GIT_PROG "git")
72
72
    set (WITHOUT_DOC false)
73
73
endif ()
74
74
 
 
75
# Include dir.
 
76
 
 
77
include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}/include)
 
78
 
75
79
# Prerequisites.
76
80
 
77
81
include (FindPkgConfig)
78
82
 
79
 
pkg_check_modules (quvi     libquvi>=0.2.0 REQUIRED)
 
83
pkg_check_modules (quvi libquvi>=0.2.0 REQUIRED QUIET)
80
84
include_directories (AFTER ${quvi_INCLUDE_DIRS})
81
85
link_directories (${quvi_LIBRARY_DIRS})
82
86
 
83
 
pkg_check_modules (curl     libcurl>=7.20 REQUIRED)
 
87
if (quvi_VERSION VERSION_GREATER 0.2.7)
 
88
    set (HAVE_QUVIOPT_NOSHORTENED true)
 
89
endif ()
 
90
 
 
91
if (quvi_VERSION VERSION_GREATER 0.2.11)
 
92
    set (HAVE_QUVIOPT_CATEGORY true)
 
93
endif ()
 
94
 
 
95
pkg_check_modules (curl libcurl>=7.20 REQUIRED QUIET)
84
96
include_directories (AFTER ${curl_INCLUDE_DIRS})
85
97
link_directories (${curl_LIBRARY_DIRS})
86
98
 
87
 
pkg_check_modules (pcre libpcrecpp>=8.02 REQUIRED)
 
99
pkg_check_modules (pcre libpcre>=8.02 REQUIRED QUIET)
88
100
include_directories (AFTER ${pcre_INCLUDE_DIRS})
89
101
link_directories (${pcre_LIBRARY_DIRS})
90
102
 
91
 
pkg_check_modules (pcrecpp  libpcrecpp>=8.02 REQUIRED)
 
103
pkg_check_modules (pcrecpp libpcrecpp>=8.02 REQUIRED QUIET)
92
104
include_directories (AFTER ${pcrecpp_INCLUDE_DIRS})
93
105
link_directories (${pcrecpp_LIBRARY_DIRS})
94
106
 
107
119
 
108
120
set (Boost_USE_STATIC_LIBS   OFF)
109
121
set (Boost_USE_MULTITHREADED OFF)
 
122
set (Boost_FIND_QUIETLY      ON)
110
123
 
111
124
find_package (Boost 1.42.0 COMPONENTS ${boost_LIBS} REQUIRED)
112
125
 
116
129
set (boost_VERSION
117
130
    "${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION}")
118
131
 
 
132
# Version 3 is a major revision with many new and improved features. It
 
133
# may, however, break some user code written for Version 2.
 
134
#
 
135
# To ease the transition, Boost releases 1.44 through 1.47 will supply
 
136
# both V2 and V3. Version 2 is the default version for Boost release 1.44
 
137
# and 1.45. Version 3 will be the default starting with release 1.46.
 
138
#   <http://www.boost.org/libs/filesystem/index.html>
 
139
 
 
140
if (boost_VERSION VERSION_GREATER 1.43.0)
 
141
    set (HAVE_BOOST_FILESYSTEM_VERSION_3 true)
 
142
endif ()
 
143
 
119
144
# Check for headers.
120
145
 
121
146
include (CheckIncludeFile)
132
157
check_function_exists (strerror     HAVE_STRERROR)
133
158
check_function_exists (fork         HAVE_FORK)
134
159
check_function_exists (getcwd       HAVE_GETCWD)
 
160
check_function_exists (getpid       HAVE_GETPID)
 
161
check_function_exists (signal       HAVE_SIGNAL)
135
162
 
136
163
# Subdirs.
137
164
 
138
 
subdirs (lib cclive man1)
 
165
subdirs (src man1)
139
166
 
140
167
# Status.
141
168
 
142
169
message (STATUS)
143
 
message (STATUS "Configuration for")
 
170
message (STATUS "Configured:")
144
171
message (STATUS "   cclive ${VERSION_LONG}")
145
172
message (STATUS)
146
 
message (STATUS "Options:")
147
 
message (STATUS "   Install prefix: ${CMAKE_INSTALL_PREFIX}")
148
 
message (STATUS "   Host setup    : ${HOST_SETUP}")
149
 
message (STATUS "   Build type    : ${CMAKE_BUILD_TYPE}")
150
 
message (STATUS "       (debug, release, relwithdebinfo, minsizerel)")
151
 
message (STATUS "   Verbose make  : ${CMAKE_VERBOSE_MAKEFILE}")
152
 
message (STATUS "   Without doc   : ${WITHOUT_DOC}")
153
 
message (STATUS)
154
173
message (STATUS "Found:")
155
174
message (STATUS "   Compiler: ${CMAKE_CXX_COMPILER}")
156
175
message (STATUS "   Linker  : ${CMAKE_LINKER}")
 
176
message (STATUS "   CMake   : ${CMAKE_VERSION}")
157
177
message (STATUS "   Make    : ${CMAKE_MAKE_PROGRAM}")
 
178
message (STATUS "   Host    : ${HOST_SETUP}")
158
179
message (STATUS "   quvi    : ${quvi_VERSION}")
159
180
message (STATUS "   curl    : ${curl_VERSION}")
160
181
message (STATUS "   pcre    : ${pcre_VERSION}")
 
182
message (STATUS "   pcrecpp : ${pcrecpp_VERSION}")
161
183
message (STATUS "   boost   : ${boost_VERSION}")
162
184
message (STATUS)
 
185
message (STATUS "Options:")
 
186
message (STATUS "   Install prefix: ${CMAKE_INSTALL_PREFIX}")
 
187
message (STATUS "   Verbose make  : ${CMAKE_VERBOSE_MAKEFILE}")
 
188
message (STATUS "   Without doc   : ${WITHOUT_DOC}")
 
189
message (STATUS "   Build type    : ${CMAKE_BUILD_TYPE}")
 
190
message (STATUS "       (debug, release, relwithdebinfo, minsizerel)")
 
191
message (STATUS)
163
192
 
164
193
# Force these variables to be written to cache.
165
194
 
182
211
    "${CMAKE_CURRENT_BINARY_DIR}/config.h"
183
212
)
184
213
 
185
 
# CPack.
186
 
 
187
 
include (InstallRequiredSystemLibraries)
188
 
 
189
 
set (CPACK_SOURCE_PACKAGE_FILE_NAME
190
 
    "cclive-${VERSION}"
191
 
    CACHE INTERNAL
192
 
    "tarball basename"
193
 
)
194
 
 
195
 
set (CPACK_PACKAGE_FILE_NAME ${CPACK_SOURCE_PACKAGE_FILE_NAME})
196
 
set (CPACK_GENERATOR "TGZ")
197
 
set (CPACK_SOURCE_GENERATOR "TGZ")
198
 
set (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/COPYING)
199
 
set (CPACK_RESOURCE_FILE_README  ${CMAKE_CURRENT_SOURCE_DIR}/README)
200
 
 
201
 
set (CPACK_SOURCE_IGNORE_FILES
202
 
    "/.git"
203
 
    "/.cmake/"
204
 
    "/CMakeFiles/"
205
 
    "/CMakeCache/"
206
 
    "/Makefile/"
207
 
    "/tmp/"
208
 
    "/OLD/"
209
 
    "/old/"
210
 
    "TODO"
211
 
    "/.gar"
212
 
)
213
 
 
214
 
# Notice the inclusion here, after setting the cpack variables.
215
 
include (CPack)
216
 
 
217
 
# dist.
218
 
 
219
 
add_custom_target (
220
 
    dist
221
 
    git log --stat --after="Thu Aug 12 15:54:58 2010" >
222
 
        "${CMAKE_CURRENT_SOURCE_DIR}/ChangeLog" && make package_source
223
 
)
 
214
include_directories (${CMAKE_CURRENT_BINARY_DIR})
224
215
 
225
216
# Uninstall.
226
217