Subversion Repositories Scribus

Rev

Rev 23022 | Rev 23029 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10215 cbradney 1
##############################################################################################################
2
########## CMake Setup                                                                              ##########
3
 
9680 cbradney 4
#Set our CMake minimum version
22412 jghali 5
#Require 2.8.9 for Qt5 and CMAKE_POSITION_INDEPENDENT_CODE property
21377 craig 6
#Require 3.1.0 for Qt 5.7 C++ 11 easy support
20014 craig 7
#Require 3.2.0 for add_custom_target with byproducts
21543 craig 8
cmake_minimum_required(VERSION 3.2.0 FATAL_ERROR)
5758 cbradney 9
 
21505 craig 10
 
11
# Configure CCache if available and wanted
21543 craig 12
if (WANT_CCACHE)
13
    find_program(CCACHE_FOUND ccache)
21505 craig 14
	if(CCACHE_FOUND)
21543 craig 15
		message(STATUS "Enabling ccache")
16
		set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
17
		set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
18
	endif()
19
endif()
21505 craig 20
 
9680 cbradney 21
#Pretty colors
21543 craig 22
set(CMAKE_COLOR_MAKEFILE ON)
20014 craig 23
#Don't force verbose
21543 craig 24
set(CMAKE_VERBOSE_MAKEFILE OFF)
9680 cbradney 25
#Include current dir
23013 craig 26
set(CMAKE_INCLUDE_CURRENT_DIR ON)
21013 craig 27
#Don't allow in source builds
21543 craig 28
#set(CMAKE_DISABLE_SOURCE_CHANGES ON)
29
#set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
21013 craig 30
 
31
 
10459 cbradney 32
#RPATH setup - more below too
21543 craig 33
if (WANT_NORPATH OR WANT_DISTROBUILD)
34
	set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
35
else()
36
	set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
37
endif()
38
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
39
set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
40
set(CMAKE_SKIP_BUILD_RPATH TRUE)
8902 cbradney 41
 
21543 craig 42
include(CheckIncludeFile)
43
include(CheckCCompilerFlag)
44
include(CheckCXXCompilerFlag)
45
include(CheckTypeSize)
46
include(TestBigEndian)
47
include(GNUInstallDirs)
48
#include(FeatureSummary)
10215 cbradney 49
 
21543 craig 50
#enable_testing()
16856 craig 51
 
9680 cbradney 52
#Set the custom CMake module directory where our include/lib finders are
21543 craig 53
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
9680 cbradney 54
 
10215 cbradney 55
##############################################################################################################
56
########## toplevel compiler flags                                                                  ##########
21543 craig 57
message(STATUS "Shared Library Flags: ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
10215 cbradney 58
 
9680 cbradney 59
#Project Setup
21543 craig 60
project(scribus)
9680 cbradney 61
#Set our version values
14911 cbradney 62
#Final version is ${VERSION} = ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_SUFFIX}
14373 cbradney 63
#where VERSION_SUFFIX is of the form "", "svn" or "Nsvn" (N being the minor patch level)
21543 craig 64
set (VERSION_MAJOR "1")
65
set (VERSION_MINOR "5")
22486 craig 66
set (VERSION_PATCH "5")
67
set (VERSION_SUFFIX "svn")
21543 craig 68
set (VERSION ${VERSION_MAJOR})
69
if (VERSION_MINOR GREATER -1)
70
	set (VERSION ${VERSION}.${VERSION_MINOR})
71
endif()
72
if (VERSION_PATCH GREATER -1)
73
	set (VERSION ${VERSION}.${VERSION_PATCH})
74
endif()
75
if (VERSION_SUFFIX)
76
	set (VERSION ${VERSION}.${VERSION_SUFFIX})
77
endif()
78
message(STATUS "Scribus ${VERSION} will be built and installed into ${CMAKE_INSTALL_PREFIX}")
5142 cbradney 79
 
9680 cbradney 80
#Set the permissions to be used when installing plugins
21543 craig 81
set(PLUGIN_PERMISSIONS WORLD_EXECUTE GROUP_EXECUTE OWNER_EXECUTE WORLD_READ GROUP_READ OWNER_READ OWNER_WRITE)
5142 cbradney 82
 
9680 cbradney 83
#Our main directory is scribus
21543 craig 84
set(MAIN_DIR_NAME "scribus")
9680 cbradney 85
 
10215 cbradney 86
##############################################################################################################
10238 cbradney 87
########## check for the CPU we build for                                                           ##########
88
 
21543 craig 89
execute_process(
20014 craig 90
	COMMAND ${CMAKE_C_COMPILER} -dumpmachine
91
	OUTPUT_VARIABLE MACHINE
92
	OUTPUT_STRIP_TRAILING_WHITESPACE
10238 cbradney 93
)
20014 craig 94
 
95
## Find out what machine/cpu we are running on
21543 craig 96
message(STATUS  "Machine: ${MACHINE}, void pointer size: ${CMAKE_SIZEOF_VOID_P}")
97
string(REGEX MATCH "(i[0-9]86-*)|(athlon-*)|(pentium-*)" _machine_x86 "${MACHINE}")
98
if (_machine_x86)
99
	message(STATUS "Found target X86")
23013 craig 100
	set(ARCH_X86 ON)
21543 craig 101
endif()
10238 cbradney 102
 
21543 craig 103
string(REGEX MATCH "(x86_64-*)|(X86_64-*)|(AMD64-*)|(amd64-*)" _machine_x86_64 "${MACHINE}")
104
if (_machine_x86_64)
105
	message(STATUS "Found target X86_64")
23013 craig 106
	set(ARCH_X86_64 ON)
21543 craig 107
endif()
10238 cbradney 108
 
21543 craig 109
string(REGEX MATCH "(sparc64-*)|(SPARC64-*)" _machine_sparc_64 "${MACHINE}")
110
if (_machine_sparc_64)
111
	message(STATUS "Found target SPARC 64")
23013 craig 112
	set(ARCH_SPARC_64 ON)
21543 craig 113
endif()
20014 craig 114
 
21543 craig 115
string(REGEX MATCH "(mips64-*)|(MIPS64-*)" _machine_mips_64 "${MACHINE}")
116
if (_machine_mips_64)
117
	message(STATUS "Found target MIPS 64")
23013 craig 118
	set(ARCH_MIPS_64 ON)
21543 craig 119
endif()
20014 craig 120
 
21543 craig 121
string(REGEX MATCH "(ppc-*)|(powerpc-*)" _machine_ppc "${MACHINE}")
122
if (_machine_ppc)
123
	message(STATUS "Found target PPC")
23013 craig 124
	set(ARCH_PPC ON)
21543 craig 125
endif()
20014 craig 126
 
21543 craig 127
string(REGEX MATCH "(ppc64-*)|(PPC64-*)|(powerpc64-*)" _machine_ppc_64 "${MACHINE}")
128
if (_machine_ppc_64)
129
	message(STATUS "Found target PPC64")
23013 craig 130
	set(ARCH_PPC_64 ON)
21543 craig 131
endif()
20014 craig 132
 
21543 craig 133
string(REGEX MATCH "(sparc-*)" _machine_sparc "${MACHINE}")
134
if (_machine_sparc)
135
	message(STATUS "Found target Sparc")
23013 craig 136
	set(ARCH_SPARC ON)
21543 craig 137
endif()
20014 craig 138
 
21543 craig 139
string(REGEX MATCH "(sparcv9-*)" _machine_sparcv9 "${MACHINE}")
140
if (_machine_sparcv9)
141
	message(STATUS "Found target Sparc v9")
23013 craig 142
	set(ARCH_SPARCV9 ON)
21543 craig 143
endif()
20014 craig 144
 
21543 craig 145
string(REGEX MATCH "(sparc64-*)" _machine_sparc64 "${MACHINE}")
146
if (_machine_sparc64)
147
	message(STATUS "Found target Sparc64")
23013 craig 148
	set(ARCH_SPARC64 ON)
149
	set(ARCH64BIT ON)
21543 craig 150
endif()
20014 craig 151
 
21543 craig 152
string(REGEX MATCH "(hppa*)" _machine_hppa "${MACHINE}")
153
if (_machine_hppa)
154
	message(STATUS "Found target Hppa")
23013 craig 155
	set(ARCH_HPPA ON)
21543 craig 156
endif()
20469 craig 157
 
158
# We need to pass -fPIC to lib2geom on amd64, mips, mipsel, and hppa. See:
159
# http://www.gentoo.org/proj/en/base/amd64/howtos/index.xml?part=1&chap=3 and
160
# http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559133
161
 
22412 jghali 162
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
20469 craig 163
 
20014 craig 164
## Do our Apple OSX version setup
23020 craig 165
if ((APPLE) AND (CMAKE_SIZEOF_VOID_P EQUAL 8) AND (ARCH_X86 OR ARCH_X86_64))
21543 craig 166
	string(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" _apple_ver "${MACHINE}")
23013 craig 167
	if (_apple_ver EQUAL "19")
168
		message(STATUS "Found macOS Catalina Target: Apple, 64 bit, X86")
23020 craig 169
		set(APPLE_10_15_X ON CACHE BOOL "Found macOS Catalina Target: Apple, 64 bit, X86")
23013 craig 170
	endif()
22697 craig 171
	if (_apple_ver EQUAL "18")
172
		message(STATUS "Found macOS Mojave Target: Apple, 64 bit, X86")
23020 craig 173
		set(APPLE_10_14_X ON CACHE BOOL "Found macOS Mojave Target: Apple, 64 bit, X86")
22697 craig 174
	endif()
22172 craig 175
	if (_apple_ver EQUAL "17")
176
		message(STATUS "Found macOS High Sierra Target: Apple, 64 bit, X86")
23020 craig 177
		set(APPLE_10_13_X ON CACHE BOOL "Found macOS High Sierra Target: Apple, 64 bit, X86")
22172 craig 178
	endif()
21543 craig 179
	if (_apple_ver EQUAL "16")
180
	    message(STATUS "Found macOS Sierra Target: Apple, 64 bit, X86")
23020 craig 181
		set(APPLE_10_12_X ON CACHE BOOL "Found macOS Sierra Target: Apple, 64 bit, X86")
21543 craig 182
	endif()
183
	if (_apple_ver EQUAL "15")
184
		message(STATUS "Found OSX El Capitan Target: Apple, 64 bit, X86")
23020 craig 185
		set(APPLE_10_11_X ON CACHE BOOL "Found OSX El Capitan Target: Apple, 64 bit, X86")
21543 craig 186
	endif()
187
	if (_apple_ver EQUAL "14")
188
		message(STATUS "Found OSX Yosemite Target: Apple, 64 bit, X86")
23020 craig 189
		set(APPLE_10_10_X ON CACHE BOOL "Found OSX Yosemite Target: Apple, 64 bit, X86")
21543 craig 190
	endif()
191
	if (_apple_ver EQUAL "13")
192
		message(STATUS "Found OSX Mavericks Target: Apple, 64 bit, X86")
23020 craig 193
		set(APPLE_10_9_X ON CACHE BOOL "Found OSX Mavericks Target: Apple, 64 bit, X86")
21543 craig 194
	endif()
195
	if (_apple_ver EQUAL "12")
196
		message(STATUS "Found OSX Mountain Lion Target: Apple, 64 bit, X86")
23020 craig 197
		set(APPLE_10_8_X ON CACHE BOOL "Found OSX Mountain Lion Target: Apple, 64 bit, X86")
21543 craig 198
	endif()
199
	if (_apple_ver EQUAL "11")
200
		message(STATUS "Found OSX Lion Target: Apple, 64 bit, X86")
23020 craig 201
		set(APPLE_10_7_X ON CACHE BOOL "Found OSX Lion Target: Apple, 64 bit, X86")
21543 craig 202
	endif()
203
	if (_apple_ver EQUAL "10")
204
		message(STATUS "Found OSX Snow Leopard Target: Apple, 64 bit, X86")
23020 craig 205
		set(APPLE_10_6_X ON CACHE BOOL "Found OSX Snow Leopard Target: Apple, 64 bit, X86")
21543 craig 206
	endif()
207
	if (_apple_ver EQUAL "9")
208
		message(STATUS "Found OSX Leopard Target: Apple, 32 bit, X86")
23020 craig 209
		set(APPLE_10_5_X ON CACHE BOOL "Found OSX Leopard Target: Apple, 32 bit, X86")
21543 craig 210
	endif()
211
	unset(ARCH_X86)
212
endif()
19233 craig 213
 
214
 
11407 cbradney 215
#convert any 64 bit build into generic 64 tag for below
21543 craig 216
if (ARCH_X86_64 OR ARCH_SPARC_64 OR ARCH_MIPS_64 OR ARCH_PPC_64)
23013 craig 217
	set(ARCH64BIT ON)
21543 craig 218
endif()
11407 cbradney 219
 
21543 craig 220
message(STATUS "Building for target ${MACHINE}")
11407 cbradney 221
 
10238 cbradney 222
##############################################################################################################
23028 jghali 223
########## Relocatability                                                                           ##########
224
 
225
if (APPLEBUNDLE OR WIN32)
226
	if (WANT_RELOCATABLE)
227
		message(STATUS "Ignoring relocatable option on Win32 or OSX when building bundle")
228
		set(WANT_RELOCATABLE 0)
229
	endif()
230
endif()
231
 
232
if (WANT_RELOCATABLE)
233
    message(STATUS "Enabling relocatable binaries")
234
	add_definitions(-DWANT_RELOCATABLE)
235
endif()
236
 
237
##############################################################################################################
10215 cbradney 238
########## Versioning Setup                                                                         ##########
239
 
9409 cbradney 240
#On Apple, we ignore the versioning tag so all items are "scribus" not "scribus-version"
21543 craig 241
if (NOT BUILD_OSX_BUNDLE)
23022 jghali 242
	set(BUILD_OSX_BUNDLE ${APPLE} CACHE BOOL "Building MacOS X Bundle")
21543 craig 243
endif()
9508 cbradney 244
 
9680 cbradney 245
#Simplify future conditionals for Apple
21543 craig 246
if (APPLE AND BUILD_OSX_BUNDLE)
23020 craig 247
	set(APPLEBUNDLE ON CACHE BOOL "Building Apple Bundle")
21543 craig 248
endif()
9680 cbradney 249
 
250
#Announce we cached a version request before, overridden below for OSX
21543 craig 251
if(TAG_VERSION)
252
	if (NOT APPLEBUNDLE)
253
		message(STATUS "Previously selected version tag: ${TAG_VERSION}")
254
	endif()
23013 craig 255
	set(WANT_VERSIONING ON)
256
	set(CACHED_VERSIONING ON)
21543 craig 257
endif()
9508 cbradney 258
 
9680 cbradney 259
#Remove version tags on OSX so our bundle is Scribus.app
21543 craig 260
if (APPLEBUNDLE OR WIN32)
261
	if (WANT_VERSIONING OR CACHED_VERSIONING)
262
		message(STATUS "Ignoring version tag on Win32 or OSX when building bundle")
23013 craig 263
		set(WANT_VERSIONING OFF)
264
		set(CACHED_VERSIONING OFF)
21543 craig 265
	endif()
266
endif()
9508 cbradney 267
 
20014 craig 268
#Store our version string if required
21543 craig 269
if (WANT_VERSIONING AND NOT CACHED_VERSIONING)
270
	if (NOT CUSTOM_VERSIONTAG)
23020 craig 271
		set(TAG_VERSION "-${VERSION}" CACHE STRING)
21543 craig 272
	else()
23020 craig 273
		set(TAG_VERSION ${CUSTOM_VERSIONTAG} CACHE STRING)
21543 craig 274
	endif()
275
endif()
5379 cbradney 276
 
10215 cbradney 277
##############################################################################################################
278
########## Install/Directory Setup                                                                  ##########
279
 
21543 craig 280
if (APPLEBUNDLE)
23022 jghali 281
	set (APPLE_APP_DIR "${CMAKE_INSTALL_PREFIX}")
21543 craig 282
	if ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/Contents/?$")
20014 craig 283
		# all ok
21543 craig 284
	else()
285
		if ("${CMAKE_INSTALL_PREFIX}" MATCHES "[.]app/?$")
20014 craig 286
			# add "/Contents" subpath
21543 craig 287
			set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Contents")
288
		else()
20014 craig 289
			# no bundle name spcified, use appname and version
21543 craig 290
			set(CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}/Scribus${VERSION}.app/Contents")
291
		endif()
292
	endif()
293
	message(STATUS "APPLEBUNDLE install prefix: ${APPLE_APP_DIR}")
294
endif()
12457 avox 295
 
296
 
19353 craig 297
#Setup all the directories we will use
22126 craig 298
#cmake_policy(SET CMP0005 OLD)
20023 craig 299
#SHARE
21543 craig 300
if(WANT_VERSIONING)
301
	set(SHAREDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/")
302
else()
303
	set(SHAREDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}/")
304
endif()
23028 jghali 305
 
306
if(IS_ABSOLUTE ${SHAREDIR} AND WANT_RELOCATABLE)
307
	message(FATAL_ERROR "ERROR: SHAREDIR must be relative when using WANT_RELOCATABLE option")
308
elseif(NOT IS_ABSOLUTE ${SHAREDIR} AND NOT WANT_RELOCATABLE)
22126 craig 309
	add_definitions(-DSHAREDIR="${CMAKE_INSTALL_PREFIX}/${SHAREDIR}")
21543 craig 310
else()
22126 craig 311
	add_definitions(-DSHAREDIR="${SHAREDIR}")
21543 craig 312
endif()
9680 cbradney 313
 
9409 cbradney 314
#SHARE - use the default on Apple as TAG_VERSION is empty
21543 craig 315
if(WIN32 OR OS2)
316
	set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/")
23028 jghali 317
elseif(TAG_VERSION OR BUILD_OSX_BUNDLE)
318
	set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}${TAG_VERSION}/")
319
elseif(NOT WANT_VERSIONING)
320
	set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}/")
21543 craig 321
else()
23028 jghali 322
	set(DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${MAIN_DIR_NAME}-${VERSION}/")
21543 craig 323
endif()
23028 jghali 324
 
325
if(IS_ABSOLUTE ${DOCDIR} AND WANT_RELOCATABLE)
326
	message(FATAL_ERROR "ERROR: DOCDIR must be relative when using WANT_RELOCATABLE option")
327
elseif(NOT IS_ABSOLUTE ${DOCDIR} AND NOT WANT_RELOCATABLE)
22126 craig 328
	add_definitions(-DDOCDIR="${CMAKE_INSTALL_PREFIX}/${DOCDIR}")
21543 craig 329
else()
22126 craig 330
	add_definitions(-DDOCDIR="${DOCDIR}")
21543 craig 331
endif()
9680 cbradney 332
 
18763 craig 333
#ICONS
21543 craig 334
if(WIN32)
335
	set(ICONDIR "${CMAKE_INSTALL_DATAROOTDIR}/icons/")
336
else()
337
	set(ICONDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/icons/")
338
endif()
23028 jghali 339
 
340
if(IS_ABSOLUTE ${ICONDIR} AND WANT_RELOCATABLE)
341
	message(FATAL_ERROR "ERROR: ICONDIR must be relative when using WANT_RELOCATABLE option")
342
elseif(NOT IS_ABSOLUTE ${ICONDIR} AND NOT WANT_RELOCATABLE)
22126 craig 343
	add_definitions(-DICONDIR="${CMAKE_INSTALL_PREFIX}/${ICONDIR}")
21543 craig 344
else()
22126 craig 345
	add_definitions(-DICONDIR="${ICONDIR}")
21543 craig 346
endif()
9680 cbradney 347
 
7269 cbradney 348
#SAMPLES
23028 jghali 349
if(WIN32)
350
	set(SAMPLESDIR "${CMAKE_INSTALL_DATAROOTDIR}/samples/")
351
else()
352
	set(SAMPLESDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/samples/")
353
endif()
354
 
355
if(IS_ABSOLUTE ${SAMPLESDIR} AND WANT_RELOCATABLE)
356
	message(FATAL_ERROR "ERROR: SAMPLESDIR must be relative when using WANT_RELOCATABLE option")
357
elseif(NOT IS_ABSOLUTE ${SAMPLESDIR} AND NOT WANT_RELOCATABLE)
22126 craig 358
	add_definitions(-DSAMPLESDIR="${CMAKE_INSTALL_PREFIX}/${SAMPLESDIR}")
21543 craig 359
else()
22126 craig 360
	add_definitions(-DSAMPLESDIR="${SAMPLESDIR}")
21543 craig 361
endif()
9680 cbradney 362
 
7269 cbradney 363
#SCRIPTS
23028 jghali 364
if(WIN32)
365
	set(SCRIPTSDIR "${CMAKE_INSTALL_DATAROOTDIR}/scripts/")
366
else()
367
	set(SCRIPTSDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/scripts/")
368
endif()
369
 
370
if(IS_ABSOLUTE ${SCRIPTSDIR} AND WANT_RELOCATABLE)
371
	message(FATAL_ERROR "ERROR: SCRIPTSDIR must be relative when using WANT_RELOCATABLE option")
372
elseif(NOT IS_ABSOLUTE ${SCRIPTSDIR} AND NOT WANT_RELOCATABLE)
22126 craig 373
	add_definitions(-DSCRIPTSDIR="${CMAKE_INSTALL_PREFIX}/${SCRIPTSDIR}")
21543 craig 374
else()
22126 craig 375
	add_definitions(-DSCRIPTSDIR="${SCRIPTSDIR}")
21543 craig 376
endif()
9680 cbradney 377
 
7269 cbradney 378
#TEMPLATES
21543 craig 379
if(WIN32)
380
	set(TEMPLATEDIR "${CMAKE_INSTALL_DATAROOTDIR}/templates/")
381
else()
382
	set(TEMPLATEDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/templates/")
383
endif()
23028 jghali 384
 
385
if(IS_ABSOLUTE ${TEMPLATEDIR} AND WANT_RELOCATABLE)
386
	message(FATAL_ERROR "ERROR: TEMPLATEDIR must be relative when using WANT_RELOCATABLE option")
387
elseif(NOT IS_ABSOLUTE ${TEMPLATEDIR} AND NOT WANT_RELOCATABLE)
22126 craig 388
	add_definitions(-DTEMPLATEDIR="${CMAKE_INSTALL_PREFIX}/${TEMPLATEDIR}")
21543 craig 389
else()
22126 craig 390
	add_definitions(-DTEMPLATEDIR="${TEMPLATEDIR}")
21543 craig 391
endif()
9680 cbradney 392
 
18763 craig 393
#QML
21543 craig 394
if(WIN32)
395
	set(QMLDIR "${CMAKE_INSTALL_DATAROOTDIR}/qml/")
396
else()
397
	set(QMLDIR "${CMAKE_INSTALL_DATAROOTDIR}/${MAIN_DIR_NAME}${TAG_VERSION}/qml/")
398
endif()
18763 craig 399
 
23028 jghali 400
if(IS_ABSOLUTE ${QMLDIR} AND WANT_RELOCATABLE)
401
	message(FATAL_ERROR "ERROR: QMLDIR must be relative when using WANT_RELOCATABLE option")
402
elseif(NOT IS_ABSOLUTE ${QMLDIR} AND NOT WANT_RELOCATABLE)
403
	add_definitions(-DQMLDIR="${CMAKE_INSTALL_PREFIX}/${QMLDIR}")
404
else()
405
	add_definitions(-DQMLDIR="${QMLDIR}")
406
endif()
407
 
9660 cbradney 408
#DESKTOP
21543 craig 409
set(DESKTOPDIR "${CMAKE_INSTALL_DATAROOTDIR}/applications/")
23028 jghali 410
 
411
if(IS_ABSOLUTE ${DESKTOPDIR} AND WANT_RELOCATABLE)
412
	message(FATAL_ERROR "ERROR: DESKTOPDIR must be relative when using WANT_RELOCATABLE option")
413
elseif(NOT IS_ABSOLUTE ${DESKTOPDIR} AND NOT WANT_RELOCATABLE)
22126 craig 414
	add_definitions(-DDESKTOPDIR="${CMAKE_INSTALL_PREFIX}/${DESKTOPDIR}")
21543 craig 415
else()
22126 craig 416
	add_definitions(-DDESKTOPDIR="${DESKTOPDIR}")
21543 craig 417
endif()
9680 cbradney 418
 
21230 mrdocs 419
#APPDATA
23028 jghali 420
set(APPDATADIR "${CMAKE_INSTALL_DATAROOTDIR}/metainfo/")
21563 jghali 421
 
23028 jghali 422
if(IS_ABSOLUTE ${APPDATADIR} AND WANT_RELOCATABLE)
423
	message(FATAL_ERROR "ERROR: APPDATADIR must be relative when using WANT_RELOCATABLE option")
424
elseif(NOT IS_ABSOLUTE ${APPDATADIR} AND NOT WANT_RELOCATABLE)
22126 craig 425
	add_definitions(-DAPPDATADIR="${CMAKE_INSTALL_PREFIX}/${APPDATADIR}")
21543 craig 426
else()
22126 craig 427
	add_definitions(-DAPPDATADIR="${APPDATADIR}")
21543 craig 428
endif()
21230 mrdocs 429
 
430
 
13066 subik 431
# APPLICATION_DATA_DIR
432
# It allows specify the user configuration directory in the compile time.
433
# Example: I want to use special ~/.scribus135svn config directory for my trunk
434
#          cmake -DAPPLICATION_DATA_DIR=.scribus135svn ...
21543 craig 435
if (APPLICATION_DATA_DIR)
23022 jghali 436
	message(STATUS "Using ApplicationDataDir ${APPLICATION_DATA_DIR} instead of the platform default.")
22126 craig 437
	add_definitions(-DAPPLICATION_DATA_DIR="${APPLICATION_DATA_DIR}")
21543 craig 438
else()
23022 jghali 439
	message(STATUS "Using standard ApplicationDataDir. You can change it with -DAPPLICATION_DATA_DIR")
21543 craig 440
endif()
13066 subik 441
 
21543 craig 442
if (APPLICATION_CONFIG_DIR)
23022 jghali 443
	message(STATUS "Using ApplicationConfigDir ${APPLICATION_CONFIG_DIR} instead of the platform default.")
22126 craig 444
	add_definitions(-DAPPLICATION_CONFIG_DIR="${APPLICATION_CONFIG_DIR}")
21543 craig 445
else()
23022 jghali 446
	message(STATUS "Using standard ApplicationConfigDir. You can change it with -DAPPLICATION_CONFIG_DIR")
21543 craig 447
endif()
21534 craig 448
 
10161 cbradney 449
#LIB LOCATION - lib or lib64 normally
7269 cbradney 450
#LIB
21543 craig 451
if(WANT_LIB64)
452
	if(NOT ARCH_X86_64)
453
		message(STATUS "WARNING: BUILDING 64 Bit build on non 64 bit architecture")
454
	endif()
23022 jghali 455
	set(LIB_SUFFIX "64" CACHE STRING)
21543 craig 456
endif()
23022 jghali 457
 
21543 craig 458
set(LIB_DIR_NAME "lib${LIB_SUFFIX}")
459
if (APPLEBUNDLE)
460
	set(LIBDIR "lib/")
461
else()
462
	set(LIBDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/")
463
endif()
9680 cbradney 464
 
23028 jghali 465
if(IS_ABSOLUTE ${LIBDIR} AND WANT_RELOCATABLE)
466
	message(FATAL_ERROR "ERROR: LIBDIR must be relative when using WANT_RELOCATABLE option")
467
elseif(NOT IS_ABSOLUTE ${LIBDIR} AND NOT WANT_RELOCATABLE)
468
	add_definitions(-DLIBDIR="${CMAKE_INSTALL_PREFIX}/${LIBDIR}")
469
else()
470
	add_definitions(-DLIBDIR="${LIBDIR}")
471
endif()
472
 
7269 cbradney 473
#PLUGINS
21543 craig 474
if(WIN32)
475
	set(PLUGINDIR "plugins")
23028 jghali 476
elseif (APPLEBUNDLE)
477
	set(PLUGINDIR "${LIBDIR}")
21543 craig 478
else()
23028 jghali 479
	set(PLUGINDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
21543 craig 480
endif()
9680 cbradney 481
 
23028 jghali 482
if(IS_ABSOLUTE ${PLUGINDIR} AND WANT_RELOCATABLE)
483
	message(FATAL_ERROR "ERROR: PLUGINDIR must be relative when using WANT_RELOCATABLE option")
484
elseif(NOT IS_ABSOLUTE ${PLUGINDIR} AND NOT WANT_RELOCATABLE)
485
	add_definitions(-DPLUGINDIR="${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}")
486
else()
487
	add_definitions(-DPLUGINDIR="${PLUGINDIR}")
488
endif()
18763 craig 489
 
23028 jghali 490
 
9660 cbradney 491
#INCLUDE
21543 craig 492
set(INCLUDEDIR "include/${MAIN_DIR_NAME}${TAG_VERSION}/")
9660 cbradney 493
#NO ADD DEFINITIONS, WE ONLY INSTALL WITH IT
9680 cbradney 494
 
7269 cbradney 495
#RPATH
21543 craig 496
if (WANT_NORPATH OR WANT_DISTROBUILD)
20014 craig 497
	set(CMAKE_INSTALL_RPATH "")
21543 craig 498
else()
20014 craig 499
	set(CMAKE_INSTALL_RPATH ${PLUGINDIR})
21543 craig 500
endif()
5142 cbradney 501
 
6319 mrdocs 502
# Set the XDG mime stuff
21543 craig 503
set(MIMEDIR "${CMAKE_INSTALL_DATAROOTDIR}/mime/packages/")
6319 mrdocs 504
 
10215 cbradney 505
##############################################################################################################
506
########## Build Setup                                                                              ##########
6319 mrdocs 507
 
9680 cbradney 508
#Convert our simpler command line option to the CMake style
5142 cbradney 509
#None, Debug, Release, .. or custom ones
23013 craig 510
# set(WANT_DEBUG ON)
21543 craig 511
if(WANT_DEBUG)
512
	set(CMAKE_BUILD_TYPE Debug)
513
endif()
514
if (WANT_RELEASEWITHDEBUG)
515
	set(CMAKE_BUILD_TYPE RelWithDebInfo)
516
endif()
517
if(NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
518
	set(CMAKE_BUILD_TYPE RELEASE)
519
endif()
5142 cbradney 520
 
13238 cbradney 521
 
522
 
9680 cbradney 523
#Based on our build type, setup our build options
21543 craig 524
if(APPLE)
23013 craig 525
	if(APPLE_10_15_X)
23020 craig 526
		set(OSXMINVER "10.15" CACHE STRING "OSX 10.15")
23013 craig 527
		if (WANT_OSX_SDK)
528
			if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"))
529
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk")
530
			elseif(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"))
531
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk")
532
			endif()
533
		endif()
534
	endif()
22697 craig 535
	if(APPLE_10_14_X)
23020 craig 536
		set(OSXMINVER "10.14" CACHE STRING "OSX 10.14")
22697 craig 537
		if (WANT_OSX_SDK)
538
			if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"))
539
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk")
540
			elseif(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"))
541
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk")
542
			endif()
543
		endif()
544
	endif()
22158 craig 545
	if(APPLE_10_13_X)
23020 craig 546
		set(OSXMINVER "10.13" CACHE STRING "OSX 10.13")
22158 craig 547
		if (WANT_OSX_SDK)
548
			if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"))
549
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk")
550
			elseif(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk"))
551
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk")
552
			endif()
553
		endif()
554
	endif()
555
	if(APPLE_10_12_X)
23020 craig 556
		set(OSXMINVER "10.12" CACHE STRING "OSX 10.12")
21543 craig 557
		if (WANT_OSX_SDK)
558
		    if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk"))
559
			    set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk")
560
			elseif(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"))
561
			    set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
562
			endif()
563
		endif()
564
	endif()
565
	if(APPLE_10_11_X)
23020 craig 566
		set(OSXMINVER "10.11" CACHE STRING "OSX 10.11")
21543 craig 567
		if (WANT_OSX_SDK)
568
			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
569
		endif()
570
	endif()
571
	if(APPLE_10_10_X)
23020 craig 572
		set(OSXMINVER "10.10" CACHE STRING "OSX 10.10")
21543 craig 573
		set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10")
574
		if (WANT_OSX_SDK)
575
			if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"))
576
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk")
577
			elseif(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk"))
578
				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
579
			endif()
580
		endif()
581
	endif()
582
	if(APPLE_10_9_X)
23020 craig 583
		set(OSXMINVER "10.9" CACHE STRING "OSX 10.9")
21543 craig 584
		if (WANT_OSX_SDK)
585
			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
586
		endif()
587
	endif()
588
	if(APPLE_10_8_X)
23020 craig 589
		set(OSXMINVER "10.8" CACHE STRING "OSX 10.8")
21543 craig 590
		if (WANT_OSX_SDK)
591
			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk")
592
		endif()
593
	endif()
594
	if(APPLE_10_7_X)
23020 craig 595
		set(OSXMINVER "10.7" CACHE STRING "OSX 10.7")
21543 craig 596
		if (WANT_OSX_SDK)
597
			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk")
598
		endif()
599
	endif()
600
	if(APPLE_10_6_X)
23020 craig 601
		set(OSXMINVER "10.6" CACHE STRING "OSX 10.6")
21543 craig 602
		if (WANT_OSX_SDK)
603
			set(CMAKE_OSX_SYSROOT "/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk")
604
		endif()
605
	endif()
606
	if(APPLE_10_5_X)
23020 craig 607
		set(OSXMINVER "10.5" CACHE STRING "OSX 10.5")
21543 craig 608
		if (WANT_OSX_SDK)
609
			set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk")
610
		endif()
611
	endif()
612
	if(APPLE_10_4_X)
23020 craig 613
		set(OSXMINVER "10.4" CACHE STRING "OSX 10.4")
21543 craig 614
		if (WANT_OSX_SDK)
615
			set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk")
616
		endif()
617
	endif()
19233 craig 618
	# gcc/mac
21543 craig 619
	if(WANT_UNIVERSAL_BUNDLE)
620
		message("Setting Universal (PPC/i386) Architecture for OSX Build/Bundle")
621
		set(CMAKE_OSX_ARCHITECTURES "ppc;i386" )
622
		set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "ppc;i386" )
623
		if (WANT_OSX_SDK)
624
			set(CMAKE_OSX_DEPLOYMENT_TARGET "10.4")
625
		endif()
626
	else()
627
		if(ARCH_PPC OR ARCH_PPC_64)
628
			message("Setting PPC Architecture for OSX Build/Bundle")
629
			set(CMAKE_OSX_ARCHITECTURES "ppc" )
630
			set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "ppc" )
631
		else()
632
			if (WANT_OSX_SDK)
633
				set(CMAKE_OSX_DEPLOYMENT_TARGET "${OSXMINVER}")
634
			endif()
23013 craig 635
			if(APPLE_10_6_X OR APPLE_10_7_X OR APPLE_10_8_X OR APPLE_10_9_X OR APPLE_10_10_X OR APPLE_10_11_X OR APPLE_10_12_X OR APPLE_10_13_X OR APPLE_10_14_X OR APPLE_10_15_X)
21543 craig 636
				message("Setting x86_64 Architecture for OSX Build/Bundle")
637
				set(CMAKE_OSX_ARCHITECTURES "x86_64" )
638
				set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "x86_64" )
639
			else()
640
				message("Setting i386 Architecture for OSX Build/Bundle")
641
				set(CMAKE_OSX_ARCHITECTURES "i386" )
642
				set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "i386" )
643
			endif()
644
		endif()
645
	endif()
646
	message(STATUS "${CMAKE_OSX_ARCHITECTURES} ${CMAKE_OSX_SYSROOT}")
647
	set(ENV{MACOSX_DEPLOYMENT_TARGET} ${OSXMINVER} )
648
	set(ENV{LD_PREBIND} 1 )
649
	set(ENV{LD_PREBIND_ALLOW_OVERLAP} 1 )
650
	if (WANT_DEBUG)
651
	    set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
652
		set(CMAKE_C_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
653
	endif()
654
	if (WANT_RELEASEWITHDEBUG)
655
	    set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
656
		set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
657
	endif()
658
	if (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
659
	    set(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
660
		set(CMAKE_C_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
661
	endif()
662
else()
663
	if(${CMAKE_GENERATOR} MATCHES "^(Visual Studio|NMake).*")
19233 craig 664
		# Windows build with Visual Studio
665
		# Surely there's a better way to identify the compiler?
21543 craig 666
		set(CMAKE_CXX_FLAGS_DEBUG)
667
		set(CMAKE_C_FLAGS_DEBUG)
668
	else()
19233 craig 669
		# vanilla gcc
21543 craig 670
		set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -Wall -fstrict-aliasing")
671
		set(CMAKE_C_FLAGS_DEBUG "-O0 -g -Wall -fstrict-aliasing")
672
		if (_machine_x86 OR _machine_x86_64)
673
			set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fPIC")
674
			set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -fPIC")
675
		endif()
676
	endif()
677
endif()
9680 cbradney 678
 
21543 craig 679
if(${CMAKE_GENERATOR} MATCHES "^(Visual Studio|NMake).*")
680
	set(CMAKE_CXX_FLAGS_RELEASE)
681
	set(CMAKE_C_FLAGS_RELEASE)
682
else()
683
    set(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -fPIC")
684
	set(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -fPIC")
685
#	add_definitions(-DNDEBUG)
686
endif()
5142 cbradney 687
 
21543 craig 688
if(WIN32)
689
	add_definitions(-DWIN32_LEAN_AND_MEAN
20014 craig 690
					-DAVOID_WIN32_FILEIO
691
					-D_CRT_SECURE_NO_DEPRECATE
692
					-D_USE_MATH_DEFINES
693
					-DCOMPILE_PLUGIN_AS_DLL
694
					)
23013 craig 695
	set(BUILD_WINDOWS_VERSION ON)
696
	set(DLL_USE_NATIVE_API ON)
21543 craig 697
endif()
10750 craig 698
 
10215 cbradney 699
##############################################################################################################
700
########## Find Dependencies                                                                        ##########
5466 cbradney 701
 
9680 cbradney 702
#<< Qt
22503 craig 703
set (QT_MIN_VERSION "5.7.0")
21543 craig 704
set(CMAKE_PREFIX_PATH "${QT_PREFIX}/lib/cmake")
705
set(CMAKE_INCLUDE_CURRENT_DIR ON)
21778 craig 706
find_package(Qt5Core ${QT_MIN_VERSION} REQUIRED)
21543 craig 707
if(Qt5Core_FOUND)
708
    message(STATUS "----- USE QT 5-----")
709
else()
710
    message(FATAL_ERROR "ERROR: No QT 5 found")
711
endif()
21778 craig 712
find_package(Qt5Widgets ${QT_MIN_VERSION} REQUIRED)
21543 craig 713
if(Qt5Widgets_FOUND)
714
    message(STATUS "----- USE QT Widgets-----")
715
else()
716
    message(FATAL_ERROR "ERROR: No QT Widgets found")
717
endif()
21778 craig 718
find_package(Qt5Gui ${QT_MIN_VERSION} REQUIRED)
21543 craig 719
if(Qt5Gui_FOUND)
720
    message(STATUS "----- USE Qt5Gui -----")
721
else()
722
    message(FATAL_ERROR "ERROR: Qt5Gui found")
723
endif()
21778 craig 724
find_package(Qt5Xml ${QT_MIN_VERSION} REQUIRED)
21543 craig 725
if(Qt5Xml_FOUND)
726
    message(STATUS "----- USE QT 5 XML -----")
727
else()
728
    message(FATAL_ERROR "ERROR: No QT 5 XML found")
729
endif()
21778 craig 730
find_package(Qt5Network ${QT_MIN_VERSION} REQUIRED)
21543 craig 731
if(Qt5Network_FOUND)
732
    message(STATUS "----- USE Qt5Network -----")
733
else()
734
    message(FATAL_ERROR "ERROR: No Qt5Network found")
735
endif()
21778 craig 736
find_package(Qt5OpenGL ${QT_MIN_VERSION} REQUIRED)
21543 craig 737
if(Qt5OpenGL_FOUND)
738
    message(STATUS "----- USE Qt5OpenGL -----")
739
else()
740
    message(FATAL_ERROR "ERROR: No Qt5OpenGL found")
741
endif()
21778 craig 742
find_package(Qt5LinguistTools ${QT_MIN_VERSION} REQUIRED)
21543 craig 743
if(Qt5LinguistTools_FOUND)
744
    message(STATUS "----- USE Qt5LinguistTools -----")
745
else()
746
    message(FATAL_ERROR "ERROR: No Qt5LinguistTools found")
747
endif()
21778 craig 748
#find_package(Qt5Quick ${QT_MIN_VERSION} REQUIRED)
21752 jghali 749
#if(Qt5Quick_FOUND)
750
#    message(STATUS "----- USE Qt5Quick -----")
751
#else()
752
#    message(FATAL_ERROR "ERROR: No Qt5Quick found")
753
#endif()
21778 craig 754
find_package(Qt5PrintSupport ${QT_MIN_VERSION} REQUIRED)
21543 craig 755
if(Qt5PrintSupport_FOUND)
756
    message(STATUS "----- USE Qt5PrintSupport -----")
757
else()
758
    message(FATAL_ERROR "ERROR: No Qt5PrintSupport found")
759
endif()
760
include_directories(${Qt5Core_INCLUDE_DIRS})
761
add_definitions(${Qt5Core_DEFINITIONS})
762
include_directories(${Qt5Widgets_INCLUDE_DIRS})
763
add_definitions(${Qt5Widgets_DEFINITIONS})
764
include_directories(${Qt5Gui_INCLUDE_DIRS})
765
add_definitions(${Qt5Gui_DEFINITIONS})
766
include_directories(${Qt5Xml_INCLUDE_DIRS})
767
add_definitions(${Qt5Xml_DEFINITIONS})
768
include_directories(${Qt5Network_INCLUDE_DIRS})
769
add_definitions(${Qt5Network_DEFINITIONS})
770
include_directories(${Qt5OpenGL_INCLUDE_DIRS})
771
add_definitions(${Qt5OpenGL_DEFINITIONS})
21752 jghali 772
#include_directories(${Qt5Quick_INCLUDE_DIRS})
773
#add_definitions(${Qt5Quick_DEFINITIONS})
21543 craig 774
include_directories(${Qt5PrintSupport_INCLUDE_DIRS})
775
add_definitions(${Qt5PrintSupport_DEFINITIONS})
21377 craig 776
 
21543 craig 777
message(STATUS "Qt VERSION: ${Qt5Widgets_VERSION}")
22522 craig 778
#if (NOT WANT_CPP11 AND Qt5Widgets_VERSION_MAJOR EQUAL 5 AND Qt5Widgets_VERSION_MINOR GREATER 6)
779
#	message(STATUS "Your Qt version is 5.7.0 or superior, enabling C++11 compiler features")
23013 craig 780
#	set(WANT_CPP11 ON)
22522 craig 781
#endif()
9680 cbradney 782
#>> Qt
783
 
21469 craig 784
 
785
#C++11 Support
22503 craig 786
#as of 1.5.5.svn, require C++11
787
#if(WANT_CPP11)
21543 craig 788
	message(STATUS "Enabling C++11 compiler features")
21469 craig 789
	set(CMAKE_CXX_STANDARD 11)
22503 craig 790
#endif()
23013 craig 791
if (WANT_CPP14)
22505 craig 792
	message(STATUS "Enabling C++14 compiler features")
793
	set(CMAKE_CXX_STANDARD 14)
794
elseif(WANT_CPP17)
23013 craig 795
		message(STATUS "Enabling C++17 compiler features")
22505 craig 796
		set(CMAKE_CXX_STANDARD 17)
797
endif()
21469 craig 798
 
10818 craig 799
#<< ZLIB, PNG
21543 craig 800
if (WIN32)
20014 craig 801
	# On win32 we can use Qt's zlib and libpng, so we use some
802
	# custom cmake includes. This permits us to honour the
803
	# USE_QT_ZLIB_PNGLIB flag if passed.
21543 craig 804
	set(PNG_DIR ${CMAKE_MODULE_PATH})
805
	set(ZLIB_DIR ${CMAKE_MODULE_PATH})
806
endif()
807
find_package(ZLIB REQUIRED)
808
if (ZLIB_FOUND)
809
	message("ZLIB Library Found OK")
23013 craig 810
	set(HAVE_LIBZ ON)
21543 craig 811
endif()
812
#find_package(PNG REQUIRED)
813
#if (PNG_FOUND)
814
#	message("PNG Library Found OK")
815
#endif()
10818 craig 816
#>> ZLIB, PNG
817
 
21543 craig 818
if (WANT_NOOSG)
819
	message("Building without 3D Extension")
820
else()
821
	find_package(OSG)
822
	if(OSG_FOUND)
823
		message("OSG found OK")
23013 craig 824
		set(HAVE_OSG ON)
21543 craig 825
		find_package(OpenGL)
21804 jghali 826
		include(CheckFunctionExists)
827
		CHECK_FUNCTION_EXISTS(memrchr HAVE_MEMRCHR)
21543 craig 828
	else()
829
		message("No OSG found, building without 3D Extension")
830
	endif()
831
endif()
13839 fschmid 832
 
17954 jghali 833
#<< JPEG, TIFF
21543 craig 834
find_package(JPEG REQUIRED)
835
if (JPEG_FOUND)
836
	message("JPEG Library Found OK")
837
endif()
838
find_package(TIFF REQUIRED)
839
if (TIFF_FOUND)
840
	message("TIFF Library Found OK")
23013 craig 841
	set(HAVE_TIFF ON)
21543 craig 842
else()
843
	message(FATAL_ERROR "Could not find the TIFF Library")
844
endif()
17954 jghali 845
#<< JPEG, TIFF
846
 
847
#<< PYTHON
21543 craig 848
#set(PythonLibs_FIND_VERSION 2)
849
find_package(PythonLibs 2 REQUIRED)
850
if (PYTHON_LIBRARY)
851
	message("Python Library Found OK")
23013 craig 852
	set(HAVE_PYTHON ON)
853
	set(COMPILE_PYTHON ON)
21543 craig 854
endif()
17954 jghali 855
#>> PYTHON
5142 cbradney 856
 
9680 cbradney 857
#<< FreeType2
21543 craig 858
find_package(Freetype REQUIRED)
859
if (FREETYPE_FOUND)
860
	message(STATUS "FreeType2 Library Found OK")
861
	include(CheckLibraryExists)
20014 craig 862
	CHECK_LIBRARY_EXISTS(${FREETYPE_LIBRARY} FT_Get_First_Char "" HAVE_FREETYPE_FIRST)
863
	CHECK_LIBRARY_EXISTS(${FREETYPE_LIBRARY} FT_Get_Next_Char "" HAVE_FREETYPE_NEXT)
864
	# here we have an alternative
865
	# a) Setup CFLAGS with the FREETYPE_INCLUDE_DIR_freetype2 provided by cmake
866
	# b) Insert ${FREETYPE_INCLUDE_DIRS} in include sections of CMakeLists that need it
867
	# I prefer (b) and at some point & from my opinion it should  be just needed in scribus/fonts/CmakeLists.txt - pm
21543 craig 868
else()
869
	message(FATAL_ERROR "No Freetype Found")
870
endif()
9680 cbradney 871
#>> FreeType2
5142 cbradney 872
 
9680 cbradney 873
#<<Render Library
21543 craig 874
if (WANT_PRIVATE_CAIRO)
875
	message("We no longer support the private cairo library as the latest public release is more up to date, setting WANT_SYSTEM_CAIRO=1")
876
endif()
7013 cbradney 877
 
21543 craig 878
if (RENDER_LIB)
879
	if (RENDER_LIB STREQUAL "QTARTHUR")
880
		message("Qt4's Arthur as renderer is not supported anymore, performing renderer detection again")
881
	endif()
882
endif()
5142 cbradney 883
 
21543 craig 884
set(CAIRO_DIR ${CMAKE_MODULE_PATH})
885
find_package(CAIRO REQUIRED)
886
if(CAIRO_FOUND)
887
	message("CAIRO Library Found OK")
23020 craig 888
	set(RENDER_LIB "CAIRO_SYSTEM" CACHE STRING "Set render library to cairo")
21543 craig 889
else()
890
	message(FATAL_ERROR "No Cairo Found")
891
endif()
9680 cbradney 892
#>>Render Library
893
 
894
#<<CUPS
21543 craig 895
if(NOT WIN32 AND NOT HAIKU)
896
	find_package(Cups REQUIRED)
897
	if(CUPS_FOUND)
23013 craig 898
		set(HAVE_CUPS ON)
21543 craig 899
		message("CUPS Library Found OK")
900
	endif()
901
else()
20014 craig 902
	# Windows doesn't use CUPS
21543 craig 903
	set(CUPS_INCLUDE_DIR)
904
endif()
9680 cbradney 905
#>>CUPS
5142 cbradney 906
 
9680 cbradney 907
#<<LibXML2
21543 craig 908
find_package(LibXml2 REQUIRED)
909
if(LIBXML2_FOUND)
23013 craig 910
	set(HAVE_XML ON)
21543 craig 911
	message("LIBXML2 Library Found OK")
912
endif()
9680 cbradney 913
#>>LibXML2
5142 cbradney 914
 
9680 cbradney 915
#<<LittleCMS
21543 craig 916
set(LCMS_DIR ${CMAKE_MODULE_PATH})
917
find_package(LCMS2 REQUIRED)
918
if(LCMS2_FOUND)
23013 craig 919
	set(HAVE_LCMS2 ON)
920
	set(HAVE_CMS ON)
21543 craig 921
	set(CMS_INC "\"lcms2.h\"")
922
	message("LittleCMS-2 Library Found OK")
923
else()
924
	message(FATAL_ERROR "Could not find the LittleCMS 2 Library")
925
endif()
9680 cbradney 926
#>>LittleCMS
5142 cbradney 927
 
9680 cbradney 928
#<<FontConfig
21543 craig 929
if(NOT WIN32)
930
	set(FONTCONFIG_DIR ${CMAKE_MODULE_PATH})
931
	find_package(FONTCONFIG)
932
	if(FONTCONFIG_FOUND)
933
		message("FontConfig Found OK")
23013 craig 934
		set(HAVE_FONTCONFIG ON)
21543 craig 935
	endif()
936
else()
20014 craig 937
	# Windows builds neither use nor require fontconfig
21543 craig 938
	set(FONTCONFIG_INCLUDE_DIR)
939
endif()
9680 cbradney 940
#>>FontConfig
5142 cbradney 941
 
17501 craig 942
#<<HUNSPELL for Speelling support
21543 craig 943
option(WANT_HUNSPELL "Enable support for spell checking with hunspell" ON)
944
if (WANT_HUNSPELL)
945
	find_package(HUNSPELL)
946
	if (HUNSPELL_FOUND)
947
		message("Hunspell Found OK")
23013 craig 948
		set(HAVE_HUNSPELL ON)
21543 craig 949
	else()
950
		message("Hunspell or its developer libraries NOT found - Disabling support for spell checking")
951
	endif()
952
endif()
17501 craig 953
#>>HUNSPELL for Speelling support
11106 cbradney 954
 
10238 cbradney 955
#<<PoDoFo for AI PDF import
21543 craig 956
option(WITH_PODOFO "Enable support for PDF embedded in AI" ON)
957
if (WITH_PODOFO)
958
	find_package(LIBPODOFO)
959
	if (LIBPODOFO_FOUND)
960
		message("PoDoFo found OK")
23013 craig 961
		set(HAVE_PODOFO ON)
21543 craig 962
	else()
963
		message("PoDoFo NOT found - Disabling support for PDF embedded in AI")
964
	endif()
965
endif()
10238 cbradney 966
#>>PoDoFo for AI PDF import
10234 fschmid 967
 
14937 fschmid 968
#<<Boost for 2Geom Tools
21543 craig 969
option(WITH_BOOST "Enable support for Boost based enhancements" ON)
970
if (WITH_BOOST)
971
	find_package(Boost)
972
	if (Boost_FOUND)
973
		message("Boost Library Found OK")
23013 craig 974
		set(HAVE_BOOST ON)
21543 craig 975
	else()
976
		message("Boost: NOT FOUND, not building 2geomtools")
977
	endif()
978
endif()
14937 fschmid 979
#>>Boost for 2Geom Tools
980
 
15714 christoph 981
#<<GraphicksMagick for image import
21543 craig 982
if (WANT_GRAPHICSMAGICK)
983
	set(GMAGICK_DIR ${CMAKE_MODULE_PATH})
20014 craig 984
	pkg_check_modules(GMAGICK GraphicsMagick)
21543 craig 985
	# find_package(GMAGICK)
986
	if(GMAGICK_FOUND)
987
		message("GraphicksMagick Found OK")
988
	else()
989
		message("GraphicksMagick NOT found! Building without additional image format support!")
990
	endif()
991
else()
992
	message("Building without GraphicksMagick (use -DWANT_GRAPHICSMAGICK=1 to enable)")
993
endif()
15714 christoph 994
#>>GraphicksMagick for image import
13957 herm 995
 
16729 fschmid 996
#<<Poppler for PDF import
21543 craig 997
find_package(POPPLER REQUIRED)
998
if (POPPLER_FOUND)
23013 craig 999
	set(HAVE_POPPLER ON)
22756 jghali 1000
	message(STATUS "Found poppler")
1001
	message(STATUS "Found poppler libs: ${POPPLER_LIBRARY}")
1002
	message(STATUS "Found poppler includes: ${POPPLER_INCLUDE_DIR}")
21543 craig 1003
else()
22756 jghali 1004
	message(FATAL_ERROR "Could not find poppler library")
21543 craig 1005
endif()
16729 fschmid 1006
#>>Poppler for PDF import
1007
 
19222 fschmid 1008
# librevenge for MsPub import
1009
pkg_check_modules(LIBREVENGE librevenge-0.0)
21543 craig 1010
if (LIBREVENGE_FOUND)
19222 fschmid 1011
	pkg_check_modules(LIBREVENGE_STREAM librevenge-stream-0.0)
21543 craig 1012
	if (LIBREVENGE_STREAM_FOUND)
19222 fschmid 1013
		pkg_check_modules(LIBREVENGE_GENERATORS librevenge-generators-0.0)
21543 craig 1014
		if (LIBREVENGE_GENERATORS_FOUND)
23013 craig 1015
			set(HAVE_REVENGE ON)
21543 craig 1016
		endif()
1017
	endif()
1018
endif()
16729 fschmid 1019
 
21452 craig 1020
# CTL support
21540 craig 1021
pkg_check_modules(HARFBUZZ REQUIRED harfbuzz>=0.9.42 harfbuzz-icu)
1022
pkg_check_modules(ICU REQUIRED icu-uc)
21452 craig 1023
 
21540 craig 1024
 
10215 cbradney 1025
##############################################################################################################
1026
########## Include Setup                                                                            ##########
8499 cbradney 1027
 
10215 cbradney 1028
TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
19222 fschmid 1029
 
5142 cbradney 1030
CHECK_INCLUDE_FILE("dlfcn.h" HAVE_DLFCN_H)
21543 craig 1031
if(HAVE_DLFCN_H)
1032
	add_definitions(-DHAVE_DLFCN_H)
1033
endif()
5142 cbradney 1034
 
1035
CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
21543 craig 1036
if(HAVE_UNISTD_H)
1037
	add_definitions(-DHAVE_UNISTD_H)
1038
endif()
5142 cbradney 1039
 
1040
CHECK_INCLUDE_FILE("sys/types.h" HAVE_SYS_TYPES_H)
21543 craig 1041
# if(HAVE_SYS_TYPES_H)
1042
#   add_definitions(-DHAVE_SYS_TYPES_H)
1043
# endif()
5142 cbradney 1044
 
1045
CHECK_INCLUDE_FILE("sys/stat.h" HAVE_SYS_STAT_H)
21543 craig 1046
# if(HAVE_SYS_STAT_H)
1047
#   add_definitions(-DHAVE_SYS_STAT_H)
1048
# endif()
9680 cbradney 1049
#>>Test for existing include files
5142 cbradney 1050
 
1051
 
5150 cbradney 1052
#Create configure files.. config.h and uninstall
1053
#config.h
21543 craig 1054
include (ConfigureChecks.cmake)
1055
	if(WIN32)
1056
		set(CONFIG_NAME win-config.h)
1057
	else()
1058
		set(CONFIG_NAME config.h)
1059
	endif()
1060
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/${CONFIG_NAME})
22126 craig 1061
add_definitions(-DHAVE_CONFIG_H)
9680 cbradney 1062
 
5142 cbradney 1063
 
5150 cbradney 1064
 
5157 cbradney 1065
#Set up include dirs with all found packages
21543 craig 1066
include_directories(
20014 craig 1067
	${CMAKE_BINARY_DIR}
1068
	${CMAKE_BINARY_DIR}/scribus
1069
	${QT_INCLUDES}
1070
	${FREETYPE_INCLUDE_DIR}
1071
	${FONTCONFIG_INCLUDE_DIR}
1072
	${JPEG_INCLUDE_DIR}
1073
	${LCMS2_INCLUDE_DIR}
1074
	${LIBXML2_INCLUDE_DIR}
1075
	${TIFF_INCLUDE_DIR}
1076
	${ZLIB_INCLUDE_DIR}
1077
	${OPENGL_INCLUDE_DIR}
1078
	${OSG_INCLUDE_DIR}
1079
	${GSL_INCLUDE_DIR}
5142 cbradney 1080
)
1081
 
21543 craig 1082
if (NOT WIN32 AND NOT HAIKU)
1083
include_directories(
20014 craig 1084
	${CUPS_INCLUDE_DIR}
18186 craig 1085
)
21543 craig 1086
endif()
18186 craig 1087
 
10215 cbradney 1088
##############################################################################################################
1089
########## Uninstall Setup                                                                          ##########
1090
 
21543 craig 1091
configure_file(
20014 craig 1092
	"${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in"
1093
	"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
1094
	IMMEDIATE @ONLY
10215 cbradney 1095
)
1096
 
21543 craig 1097
add_custom_target(uninstall
20014 craig 1098
	"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
1099
)
19222 fschmid 1100
 
1101
 
10215 cbradney 1102
##############################################################################################################
1103
########## Add our subdirs                                                                          ##########
1104
 
5157 cbradney 1105
#Add our source subdirs
21543 craig 1106
add_subdirectory(scribus)
1107
add_subdirectory(doc)
1108
add_subdirectory(resources/dicts)
1109
add_subdirectory(resources/editorconfig)
1110
add_subdirectory(resources/iconsets)
1111
add_subdirectory(resources/keysets)
1112
add_subdirectory(resources/loremipsum)
1113
add_subdirectory(resources/manpages)
1114
add_subdirectory(resources/profiles)
1115
add_subdirectory(resources/swatches)
1116
add_subdirectory(resources/templates)
1117
add_subdirectory(resources/translations)
22575 jghali 1118
add_subdirectory(resources/unicodemap)
5142 cbradney 1119
 
5157 cbradney 1120
#Install our READMEs etc.
21543 craig 1121
install(FILES
19171 craig 1122
	AUTHORS
1123
	ChangeLog
1124
	COPYING
1125
	LINKS
1126
	README
1127
	TRANSLATION
1128
	DESTINATION ${DOCDIR}
5142 cbradney 1129
)
9386 cbradney 1130
 
21543 craig 1131
if (APPLE)
1132
	install(FILES
20014 craig 1133
		README.MacOSX
1134
		DESTINATION ${DOCDIR}
1135
	)
18763 craig 1136
 
21543 craig 1137
	#	execute_process (COMMAND mkdir -p "${CMAKE_INSTALL_PREFIX}/PlugIns/imageformats")
1138
	#	if (NOT EXISTS "${CMAKE_INSTALL_PREFIX}/PlugIns/imageformats/libqjpeg.dylib")
1139
	#message(STATUS ${QT_PREFIX})
1140
	#message(STATUS "@QT_PREFIX@/plugins/imageformats/libqjpeg.dylib")
1141
	#message(STATUS "${CMAKE_INSTALL_PREFIX}/PlugIns/imageformats/libqjpeg.dylib")
1142
	#		execute_process (COMMAND ditto "@QT_PREFIX@/plugins/imageformats/libqjpeg.dylib" "${CMAKE_INSTALL_PREFIX}/PlugIns/imageformats/libqjpeg.dylib")
1143
	#	endif()
18763 craig 1144
 
21543 craig 1145
endif()
17500 craig 1146
 
21433 mrdocs 1147
#Install the .desktop file
21543 craig 1148
configure_file(
21481 craig 1149
	${CMAKE_CURRENT_SOURCE_DIR}/scribus.desktop.in
1150
	${CMAKE_CURRENT_SOURCE_DIR}/scribus.desktop
1151
)
21543 craig 1152
install(FILES
21433 mrdocs 1153
	scribus.desktop
21481 craig 1154
	RENAME scribus${TAG_VERSION}.desktop
21433 mrdocs 1155
	DESTINATION ${DESKTOPDIR}
1156
)
1157
 
9680 cbradney 1158
#Install our MIME data
21543 craig 1159
install(FILES
20014 craig 1160
	scribus.xml
21481 craig 1161
	RENAME scribus${TAG_VERSION}.xml
20014 craig 1162
	DESTINATION ${MIMEDIR}
6319 mrdocs 1163
)
5396 cbradney 1164
 
21230 mrdocs 1165
 
1166
#Install the appdata file
21543 craig 1167
configure_file(
21481 craig 1168
	${CMAKE_CURRENT_SOURCE_DIR}/scribus.appdata.xml.in
1169
	${CMAKE_CURRENT_SOURCE_DIR}/scribus.appdata.xml
1170
)
21543 craig 1171
install(FILES
21481 craig 1172
	scribus.appdata.xml
1173
	RENAME scribus${TAG_VERSION}.appdata.xml
1174
	DESTINATION ${APPDATADIR}
21230 mrdocs 1175
)
1176
 
1177
 
9680 cbradney 1178
#If building an Apple bundle, install these specific files
21543 craig 1179
if(APPLEBUNDLE)
1180
	install(FILES
20014 craig 1181
		Scribus.app/Contents/Info.plist
1182
		DESTINATION ${CMAKE_INSTALL_PREFIX}
1183
	)
21543 craig 1184
	install(FILES
20014 craig 1185
		Scribus.app/Contents/Resources/Scribus.icns
1186
		Scribus.app/Contents/Resources/Scribus-doc.icns
1187
		DESTINATION ${CMAKE_INSTALL_PREFIX}/Resources
1188
	)
21543 craig 1189
endif()
9386 cbradney 1190
 
10215 cbradney 1191
##############################################################################################################
1192
########## Install/CPack Setup                                                                      ##########
1193
 
9680 cbradney 1194
# If the cmake version includes cpack, use it for tarball building
21543 craig 1195
if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
1196
	set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Scribus is an open source publishing application for Linux, Mac OSX and Windows")
1197
	set(CPACK_PACKAGE_VENDOR "Scribus Team")
1198
	set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README")
1199
	set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/README")
1200
	set(CPACK_PACKAGE_VERSION_MAJOR "${VERSION_MAJOR}")
1201
	set(CPACK_PACKAGE_VERSION_MINOR "${VERSION_MINOR}")
1202
	set(CPACK_PACKAGE_VERSION_PATCH "${VERSION_PATCH}")
1203
	set(CPACK_PACKAGE_INSTALL_DIRECTORY "Scribus ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
1204
	set(CPACK_PACKAGE_EXECUTABLES "scribus${TAG_VERSION}")
1205
	set(CPACK_SOURCE_PACKAGE_FILE_NAME "scribus-${VERSION}${VERSION_SUFFIX}")
1206
	set(CPACK_SOURCE_GENERATOR TBZ2)
1207
	set(CPACK_SYSTEM_NAME "")
1208
	set(CPACK_TOPLEVEL_TAG "")
1209
	set(CPACK_SOURCE_IGNORE_FILES
20014 craig 1210
		CMakeCache.txt
22486 craig 1211
		scribus-1.5.5.tar.bz2
1212
		scribus-1.5.5.tar.Z
1213
		scribus-1.5.5.tar.gz
1214
		scribus-1.5.5.svn.tar.bz2
1215
		scribus-1.5.5.svn.tar.Z
1216
		scribus-1.5.5.svn.tar.gz
20014 craig 1217
		"~$"
1218
		"\\\\.cvsignore$"
1219
		"\\\\.o$"
1220
		"\\\\.svn-base$"
1221
		"\\\\.svn$"
1222
		"^${PROJECT_SOURCE_DIR}.*/CVS/"
1223
		"^${PROJECT_SOURCE_DIR}/debian/"
1224
		"^${PROJECT_SOURCE_DIR}/old/"
1225
		"^${PROJECT_SOURCE_DIR}.*/CVSROOT/"
1226
		"^${PROJECT_SOURCE_DIR}/admin/"
1227
	)
21543 craig 1228
	include(CPack)
1229
endif()
14097 cbradney 1230
 
20014 craig 1231
#include (cmakeconfigreport optional)
21325 craig 1232
 
1233
# Output everything we've found
1234
#feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES)