Subversion Repositories Scribus

Rev

Rev 9317 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
5142 cbradney 1
#CMAKE SETUP
5758 cbradney 2
#Require 2.4.2 for Qt finding
3
#Require 2.4.3 for moc change detection
4
#Require 2.4.3 for rpath updates for custom cairo install
8497 cbradney 5
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.3 FATAL_ERROR)
5758 cbradney 6
 
5142 cbradney 7
SET(CMAKE_COLOR_MAKEFILE ON)
9018 cbradney 8
#SET(CMAKE_VERBOSE_MAKEFILE ON)
5142 cbradney 9
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
5758 cbradney 10
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
5790 cbradney 11
#SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
5758 cbradney 12
#SET(CMAKE_SKIP_RPATH:BOOL NO)
5144 cbradney 13
SET(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
14
 
8896 cbradney 15
set(CMAKE_SKIP_BUILD_RPATH TRUE)
16
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
17
 
5142 cbradney 18
SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
19
# SET(CMAKE_SHARED_MODULE_LINK_FLAGS "${CMAKE_SHARED_MODULE_LINK_FLAGS} -export-dynamic")
20
# SET(CMAKE_SHARED_MODULE_LINK_CXX_FLAGS "${CMAKE_SHARED_MODULE_LINK_CXX_FLAGS} -export-dynamic")
21
# SET(CMAKE_SHARED_LIBRARY_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} -export-dynamic")
22
# SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -export-dynamic")
23
# MESSAGE(STATUS ${CMAKE_SHARED_MODULE_LINK_FLAGS})
24
# MESSAGE(STATUS ${CMAKE_SHARED_MODULE_LINK_CXX_FLAGS})
25
# MESSAGE(STATUS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
26
# MESSAGE(STATUS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
27
# MESSAGE(STATUS ${CMAKE_CXX_CREATE_SHARED_MODULE})
28
# MESSAGE(STATUS ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
29
 
30
#IMPORT FROM COMMANDLINE
31
# SET with cmake -DWANT_CAIRO=1, etc
32
# MESSAGE(STATUS ${WANT_CAIRO})
33
# MESSAGE(STATUS ${WANT_LIBART})
34
# MESSAGE(STATUS ${WANT_DEBUG})
5157 cbradney 35
 
36
# SET(WANT_CAIRO 0)
37
# SET(WANT_LIBART 1)
38
 
5142 cbradney 39
#PROJECT SETUP
40
PROJECT(scribus)
5396 cbradney 41
SET (VERSION_MAJOR "1")
42
SET (VERSION_MINOR "3")
8497 cbradney 43
SET (VERSION_PATCH "4")
9317 mrdocs 44
SET (VERSION_SUFFIX "")
5407 cbradney 45
SET (VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX})
46
MESSAGE(STATUS "Scribus ${VERSION} will be built to install into ${CMAKE_INSTALL_PREFIX}")
5142 cbradney 47
 
48
SET(PLUGIN_PERMISSIONS WORLD_EXECUTE GROUP_EXECUTE OWNER_EXECUTE WORLD_READ GROUP_READ OWNER_READ OWNER_WRITE)
49
 
5379 cbradney 50
SET(MAIN_DIR_NAME "scribus")
6891 cbradney 51
IF(TAG_VERSION)
52
  MESSAGE(STATUS "Previously selected version tag: ${TAG_VERSION}")
53
  SET(WANT_VERSIONING 1)
54
  SET(CACHED_VERSIONING 1)
55
ENDIF(TAG_VERSION)
56
IF (WANT_VERSIONING AND NOT CACHED_VERSIONING)
5396 cbradney 57
  IF (NOT CUSTOM_VERSIONTAG)
6891 cbradney 58
    SET(TAG_VERSION "-${VERSION}" CACHE TYPE STRING)
5396 cbradney 59
  ELSE (NOT CUSTOM_VERSIONTAG)
6891 cbradney 60
    SET(TAG_VERSION ${CUSTOM_VERSIONTAG} CACHE TYPE STRING)
5396 cbradney 61
  ENDIF (NOT CUSTOM_VERSIONTAG)
6891 cbradney 62
ENDIF (WANT_VERSIONING AND NOT CACHED_VERSIONING)
5379 cbradney 63
 
7269 cbradney 64
#MAN
65
SET(MANDIR "share/man/")
6893 cbradney 66
SET(SHAREDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/")
5142 cbradney 67
ADD_DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"")
7269 cbradney 68
#SHARE
69
IF(TAG_VERSION)
70
  SET(DOCDIR "share/doc/${MAIN_DIR_NAME}${TAG_VERSION}/")
71
ELSE(TAG_VERSION)
72
  SET(DOCDIR "share/doc/${MAIN_DIR_NAME}-${VERSION}/")
73
ENDIF (TAG_VERSION)
5142 cbradney 74
ADD_DEFINITIONS("-DDOCDIR=\\\"${CMAKE_INSTALL_PREFIX}/${DOCDIR}\\\"")
7269 cbradney 75
#ICON
5379 cbradney 76
SET(ICONDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/icons/")
5142 cbradney 77
ADD_DEFINITIONS("-DICONDIR=\\\"${CMAKE_INSTALL_PREFIX}/${ICONDIR}\\\"")
7269 cbradney 78
#SAMPLES
5379 cbradney 79
SET(SAMPLESDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/samples/")
5142 cbradney 80
ADD_DEFINITIONS("-DSAMPLESDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SAMPLESDIR}\\\"")
7269 cbradney 81
#SCRIPTS
5379 cbradney 82
SET(SCRIPTSDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/scripts/")
5142 cbradney 83
ADD_DEFINITIONS("-DSCRIPTSDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}\\\"")
7269 cbradney 84
#TEMPLATES
5379 cbradney 85
SET(TEMPLATEDIR "share/${MAIN_DIR_NAME}${TAG_VERSION}/templates/")
5142 cbradney 86
ADD_DEFINITIONS("-DTEMPLATEDIR=\\\"${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}\\\"")
7269 cbradney 87
#LIB
5379 cbradney 88
SET(LIBDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/")
5142 cbradney 89
ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"")
7269 cbradney 90
#PLUGINS
5379 cbradney 91
SET(PLUGINDIR "lib/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
5142 cbradney 92
ADD_DEFINITIONS("-DPLUGINDIR=\\\"${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}\\\"")
7269 cbradney 93
#RPATH
5142 cbradney 94
set(CMAKE_INSTALL_RPATH ${PLUGINDIR})
95
 
6319 mrdocs 96
# Set the XDG mime stuff
6320 mrdocs 97
SET(MIMEDIR "share/mime/packages/")
6319 mrdocs 98
 
99
 
5142 cbradney 100
#BUILD SETUP
101
#None, Debug, Release, .. or custom ones
7943 cbradney 102
# SET(WANT_DEBUG 1)
5142 cbradney 103
IF(WANT_DEBUG)
104
  SET(CMAKE_BUILD_TYPE Debug)
105
ELSE(WANT_DEBUG)
106
  SET(CMAKE_BUILD_TYPE RELEASE)
107
ENDIF(WANT_DEBUG)
108
 
5468 avox 109
IF(APPLE)
110
  SET( ENV{MACOSX_DEPLOYMENT_TARGET} 10.3 )
111
  SET( ENV{LD_PREBIND} 1 )
112
  SET( ENV{LD_PREBIND_ALLOW_OVERLAP} 1 )
113
  SET(CMAKE_CXX_FLAGS_DEBUG "-O2 -g3 -fno-inline-functions -Wall")
114
  SET(CMAKE_C_FLAGS_DEBUG "-O2 -g3 -fno-inline-functions -Wall")
5558 avox 115
  SET(BUILD_MAC_BUNDLE 1)
5468 avox 116
ELSE(APPLE)
8497 cbradney 117
  SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -Wall")
118
  SET(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -Wall")
5468 avox 119
ENDIF(APPLE)
5271 mrdocs 120
SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall")
121
SET(CMAKE_C_FLAGS_RELEASE "-O2 -Wall")
5142 cbradney 122
 
5466 cbradney 123
 
124
INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
5467 avox 125
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
5466 cbradney 126
 
5142 cbradney 127
#FIND DEPENDENCIES
128
# START QT
129
SET (QT_MT_REQUIRED true)
8497 cbradney 130
SET (QT_MIN_VERSION "3.3.4")
131
FIND_PACKAGE(Qt3 REQUIRED)
5142 cbradney 132
IF (QT_FOUND)
8497 cbradney 133
  MESSAGE("Qt3 Found OK (${qt_version_str})")
5474 cbradney 134
#   MESSAGE("$ENV{QTDIR}")
135
#   MESSAGE("${QT_MOC_EXECUTABLE}")
136
#   MESSAGE("${QT_UIC_EXECUTABLE}")
137
#   MESSAGE("${QT_QT_LIBRARY}")
138
#   MESSAGE("${QT_INCLUDE_DIR}")
139
#   MESSAGE("${qt_version_str}")
5382 cbradney 140
#   MESSAGE(${qt_version_str_lib})
5142 cbradney 141
ELSE(QT_FOUND)
8497 cbradney 142
  MESSAGE(FATAL_ERROR "No Qt3")
5142 cbradney 143
ENDIF(QT_FOUND)
144
# END QT
145
# START PNG, JPEG, TIFF
146
FIND_PACKAGE(PNG REQUIRED)
147
IF (PNG_FOUND)
148
  MESSAGE("PNG Library Found OK")
149
ENDIF(PNG_FOUND)
150
FIND_PACKAGE(JPEG REQUIRED)
151
IF (JPEG_FOUND)
152
  MESSAGE("JPEG Library Found OK")
153
ENDIF(JPEG_FOUND)
154
FIND_PACKAGE(TIFF REQUIRED)
155
IF (TIFF_FOUND)
156
  MESSAGE("TIFF Library Found OK")
157
  SET(HAVE_TIFF 1)
6211 cbradney 158
ELSE(TIFF_FOUND)
159
  MESSAGE(FATAL_ERROR "Could not find the TIFF Library")
5142 cbradney 160
ENDIF(TIFF_FOUND)
161
FIND_PACKAGE(ZLIB REQUIRED)
162
IF (ZLIB_FOUND)
163
  MESSAGE("ZLIB Library Found OK")
164
  SET(HAVE_LIBZ 1)
165
ENDIF(ZLIB_FOUND)
166
FIND_PACKAGE(PythonLibs REQUIRED)
167
IF (PYTHON_LIBRARY)
168
  MESSAGE("Python Library Found OK")
169
  SET(HAVE_PYTHON 1)
170
  SET(COMPILE_PYTHON 1)
171
ENDIF(PYTHON_LIBRARY)
172
 
173
# START FREETYPE
174
SET(FREETYPE_DIR ${CMAKE_MODULE_PATH})
175
FIND_PACKAGE(FREETYPE REQUIRED)
176
IF (FREETYPE_FOUND)
177
  MESSAGE("FreeType2 Library Found OK")
5170 cbradney 178
  CHECK_LIBRARY_EXISTS(libfreetype.so FT_Get_First_Char "" HAVE_FREETYPE_FIRST)
179
  CHECK_LIBRARY_EXISTS(libfreetype.so FT_Get_Next_Char "" HAVE_FREETYPE_NEXT)
5142 cbradney 180
ENDIF(FREETYPE_FOUND)
181
#FIXME: if cflags empty add, otherwise replace as now
182
SET(CFLAGS "${LIBFREETYPE_CFLAGS}")
183
# END FREETYPE
184
 
7013 cbradney 185
# If we have a RENDER_LIB selected from a previous cmake run, then use it
186
# otherwise, we should be defaulting to Libart_LGPL for 1.3.4.x
6686 cbradney 187
IF(RENDER_LIB)
188
  MESSAGE(STATUS "Previously selected rendering system: ${RENDER_LIB}")
7013 cbradney 189
ELSE(RENDER_LIB)
190
  IF (NOT WANT_CAIRO)
191
    SET(WANT_LIBART 1)
192
  ENDIF (NOT WANT_CAIRO)
6686 cbradney 193
ENDIF(RENDER_LIB)
7013 cbradney 194
 
195
# START LIBART_LGPL
6686 cbradney 196
IF (WANT_LIBART OR RENDER_LIB STREQUAL "LIBART")
5142 cbradney 197
  SET(LIBART_LGPL_DIR ${CMAKE_MODULE_PATH})
198
  FIND_PACKAGE(LIBART_LGPL REQUIRED)
199
  IF(LIBART_LGPL_FOUND)
6686 cbradney 200
    SET(RENDER_LIB "LIBART" CACHE TYPE STRING)
5142 cbradney 201
    MESSAGE("Libart_LGPL Library Found OK")
6686 cbradney 202
  ELSE(LIBART_LGPL_FOUND)
203
    SET(OLDRENDERLIBLOST TRUE)
5142 cbradney 204
  ENDIF(LIBART_LGPL_FOUND)
6686 cbradney 205
ELSE (WANT_LIBART OR RENDER_LIB STREQUAL "LIBART")
5142 cbradney 206
  # START CAIRO
5157 cbradney 207
  SET(CAIRO_DIR ${CMAKE_MODULE_PATH})
208
  FIND_PACKAGE(CAIRO)
5142 cbradney 209
  IF(CAIRO_FOUND)
210
    MESSAGE("CAIRO Library Found OK")
6686 cbradney 211
    SET(RENDER_LIB "CAIRO" CACHE TYPE STRING)
212
  ELSE(CAIRO_FOUND)
213
    SET(OLDRENDERLIBLOST TRUE)
5142 cbradney 214
  ENDIF(CAIRO_FOUND)
215
  # END CAIRO
6686 cbradney 216
ENDIF (WANT_LIBART OR RENDER_LIB STREQUAL "LIBART")
5142 cbradney 217
# END LIBART_LGPL
218
 
6686 cbradney 219
IF(NOT RENDER_LIB OR OLDRENDERLIBLOST)
5170 cbradney 220
  MESSAGE(FATAL_ERROR "ERROR: Neither LibArt_LGPL nor cairo have been selected or found, please correct and restart cmake")
6686 cbradney 221
ENDIF(NOT RENDER_LIB OR OLDRENDERLIBLOST)
5159 cbradney 222
 
223
 
5142 cbradney 224
# START CUPS
7239 cbradney 225
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
7202 cbradney 226
  SET(Cups_DIR ${CMAKE_MODULE_PATH})
7239 cbradney 227
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
7202 cbradney 228
FIND_PACKAGE(Cups REQUIRED)
5142 cbradney 229
IF(CUPS_FOUND)
230
  SET(HAVE_CUPS 1)
231
  MESSAGE("CUPS Library Found OK")
232
ENDIF(CUPS_FOUND)
233
# END CUPS
234
 
235
# START LIBXML2
7203 cbradney 236
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
237
  SET(LibXml2_DIR ${CMAKE_MODULE_PATH})
238
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
239
FIND_PACKAGE(LibXml2 REQUIRED)
5142 cbradney 240
IF(LIBXML2_FOUND)
241
  SET(HAVE_XML 1)
242
  MESSAGE("LIBXML2 Library Found OK")
243
ENDIF(LIBXML2_FOUND)
244
# END LIBXML2
245
 
246
# START LCMS
247
SET(LCMS_DIR ${CMAKE_MODULE_PATH})
248
FIND_PACKAGE(LCMS REQUIRED)
249
IF(LCMS_FOUND)
250
  SET(HAVE_CMS 1)
251
  SET(CMS_INC "lcms.h")
6553 cbradney 252
  MESSAGE("LittleCMS Library Found OK")
253
ELSE(LCMS_FOUND)
254
  MESSAGE(FATAL_ERROR "Could not find the LittleCMS Library")
5142 cbradney 255
ENDIF(LCMS_FOUND)
256
# END LCMS
257
 
258
# START FONTCONFIG
259
SET(FONTCONFIG_DIR ${CMAKE_MODULE_PATH})
260
FIND_PACKAGE(FONTCONFIG)
261
IF(FONTCONFIG_FOUND)
262
	MESSAGE("FontConfig Found OK")
263
	SET(HAVE_FONTCONFIG 1)
264
ENDIF(FONTCONFIG_FOUND)
265
# END FONTCONFIG
266
 
8497 cbradney 267
ADD_DEFINITIONS(${QT_DEFINITIONS})
5142 cbradney 268
 
269
CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
270
IF(HAVE_DLFCN_H)
271
  ADD_DEFINITIONS(-DHAVE_DLFCN_H)
272
ENDIF(HAVE_DLFCN_H)
273
 
274
CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
275
IF(HAVE_UNISTD_H)
276
  ADD_DEFINITIONS(-DHAVE_UNISTD_H)
277
ENDIF(HAVE_UNISTD_H)
278
 
279
CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
280
# IF(HAVE_SYS_TYPES_H)
281
#   ADD_DEFINITIONS(-DHAVE_SYS_TYPES_H)
282
# ENDIF(HAVE_SYS_TYPES_H)
283
 
284
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
285
# IF(HAVE_SYS_STAT_H)
286
#   ADD_DEFINITIONS(-DHAVE_SYS_STAT_H)
287
# ENDIF(HAVE_SYS_STAT_H)
288
 
289
 
5150 cbradney 290
#Create configure files.. config.h and uninstall
291
#config.h
5142 cbradney 292
INCLUDE (ConfigureChecks.cmake)
293
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
294
ADD_DEFINITIONS("-DHAVE_CONFIG_H")
5150 cbradney 295
#uninstall
296
CONFIGURE_FILE(
297
  "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
298
  "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
299
  IMMEDIATE @ONLY)
5142 cbradney 300
 
5150 cbradney 301
ADD_CUSTOM_TARGET(uninstall
302
  "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
303
 
5157 cbradney 304
#Load our SCRIBUSQT package which gives us filename.moc instead of moc_filename.*
8497 cbradney 305
SET(SCRIBUSQT_DIR ${CMAKE_MODULE_PATH})
306
FIND_PACKAGE(SCRIBUSQT)
5142 cbradney 307
 
5157 cbradney 308
#Set up include dirs with all found packages
5142 cbradney 309
INCLUDE_DIRECTORIES(
5203 cbradney 310
${CMAKE_BINARY_DIR}
5205 cbradney 311
${CMAKE_BINARY_DIR}/scribus
8497 cbradney 312
${QT_INCLUDE_DIR}
313
${QT_INCLUDE_PATH}
5142 cbradney 314
${CUPS_INCLUDE_DIR}
315
${FREETYPE_INCLUDE_DIR}
316
${FONTCONFIG_INCLUDE_DIR}
9716 avox 317
${JPEG_INCLUDE_DIR}
5142 cbradney 318
${LCMS_INCLUDE_DIR}
319
${LIBXML2_INCLUDE_DIR}
320
${PYTHON_INCLUDE_PATH}
321
${TIFF_INCLUDE_DIR}
322
${ZLIB_INCLUDE_DIR}
323
)
324
 
5758 cbradney 325
 
8730 cbradney 326
# #Set up libraries to link with all found packages
327
#
328
# #Select Libart_LGPL or Cairo
329
# IF(RENDER_LIB STREQUAL "LIBART")
330
#   INCLUDE_DIRECTORIES(${LIBART_LGPL_INCLUDE_DIR})
331
#   LINK_LIBRARIES(${LIBART_LGPL_LIBRARIES})
332
# ENDIF(RENDER_LIB STREQUAL "LIBART")
333
# IF(RENDER_LIB STREQUAL "CAIRO")
334
#   INCLUDE_DIRECTORIES(${CAIRO_INCLUDE_DIR})
335
#   LINK_LIBRARIES(${CAIRO_LIBRARIES})
336
#   LINK_DIRECTORIES(${PREFIX_CAIRO_LIB})
337
#   SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_RPATH};${PREFIX_CAIRO_LIB}")
338
# ENDIF(RENDER_LIB STREQUAL "CAIRO")
339
#
340
# MESSAGE("RPATH: ${CMAKE_INSTALL_RPATH}")
341
#
342
# LINK_LIBRARIES (
343
# ${QT_QT_LIBRARY}
344
# ${CUPS_LIBRARIES}
345
# ${FREETYPE_LIBRARIES}
346
# ${FONTCONFIG_LIBRARIES}
347
# ${LCMS_LIBRARIES}
348
# ${LIBXML2_LIBRARIES}
349
# ${PYTHON_LIBRARIES}
350
# ${TIFF_LIBRARIES}
351
# ${JPEG_LIBRARIES}
352
# ${ZLIB_LIBRARIES}
353
# )
354
#
355
# IF(WIN32)
356
#   LINK_LIBRARIES(
357
#     ${QT_QTMAIN_LIBRARY}
358
#   )
359
# ENDIF(WIN32)
360
#
361
# IF(WIN32)
362
#   ADD_DEFINITIONS(-DQT_DLL)
363
# ENDIF(WIN32)
364
#
365
# IF(APPLE)
366
#   LINK_LIBRARIES( "-undefined dynamic_lookup" )
367
#   LINK_LIBRARIES( "-framework CoreFoundation" )
368
# ENDIF(APPLE)
5758 cbradney 369
 
370
 
5157 cbradney 371
#Add our source subdirs
5142 cbradney 372
ADD_SUBDIRECTORY(scribus)
373
 
5157 cbradney 374
#Install our READMEs etc.
5142 cbradney 375
INSTALL(FILES
376
AUTHORS
377
BUILDING
378
ChangeLog
379
ChangeLogCVS
380
COPYING
381
INSTALL
382
NEWS
383
PACKAGING
384
README
385
README.MacOSX
386
TODO
6319 mrdocs 387
 
5142 cbradney 388
  DESTINATION ${DOCDIR}
389
)
6319 mrdocs 390
INSTALL(FILES
391
scribus.xml
392
DESTINATION ${MIMEDIR}
393
)
5396 cbradney 394
 
395
# If the cmake version includes cpack, use it
396
IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
397
  SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Scribus is an open source publishing application for Linux, Mac OSX and Windows")
398
  SET(CPACK_PACKAGE_VENDOR "Scribus Team")
399
  SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
400
  SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/README")
401
  SET(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
402
  SET(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
403
  SET(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
5407 cbradney 404
  SET(CPACK_PACKAGE_INSTALL_DIRECTORY "Scribus ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
5396 cbradney 405
  SET(CPACK_PACKAGE_EXECUTABLES "scribus${TAG_VERSION}")
7392 mrdocs 406
  SET(CPACK_SOURCE_PACKAGE_FILE_NAME "scribus-${VERSION}")
5407 cbradney 407
  SET(CPACK_SOURCE_GENERATOR TBZ2)
7392 mrdocs 408
## I'll make this prettier later - ignore any tarballs in the root
9317 mrdocs 409
  SET(CPACK_SOURCE_IGNORE_FILES CMakeCache.txt scribus-1.3.4.tar.bz2 scribus-1.3.4.tar.Z scribus-1.3.4.tar.gz "~$" "\\\\.cvsignore$" "^${PROJECT_SOURCE_DIR}.*/CVS/" "^${PROJECT_SOURCE_DIR}/debian/" "^${PROJECT_SOURCE_DIR}/old/" "^${PROJECT_SOURCE_DIR}.*/CVSROOT/" "^${PROJECT_SOURCE_DIR}.*/autom4te.cache/")
5396 cbradney 410
  INCLUDE(CPack)
5463 avox 411
ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")