summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
blob: 4b12f871a874cb291da8060ec5a53e7d62c66c09 (plain)
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
#################################################
#
#  (C) 2011 Timothy Pearson
#  kb9vqf (AT) pearsoncomputing.net
#
#  Improvements and feedback are welcome
#
#  This file is released under GPL >= 2
#
#################################################


##### set project version ########################

include( TDEVersion )
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
tde_set_project_version( )


##### general package setup #####################

project( kbfx )


##### include essential cmake modules ###########

include( CheckCXXSourceCompiles )
include( CheckFunctionExists )
include( CheckIncludeFileCXX )
include( CheckLibraryExists )
include( CheckStructHasMember )
include( CheckSymbolExists )
include( CheckTypeSize )
include( FindPkgConfig )


##### include our cmake modules #################

include( TDEMacros )


##### setup install paths #######################

include( TDESetupPaths )
tde_setup_paths( )

##### set version numbers #######################

# For versions that are stable set to 1, else to 0
set(APPLICATION_STABLE 1)

set(LIB_MAJOR 4)
set(LIB_MINOR 9)
set(LIB_RELEASE 3)
set(LIB_SUB_RELEASE 1)
set(APPLICATION_INTERNAL_VERSION "20070516")
set(APPLICATION_DATE "2007-05-16")

set(APPLICATION_NAME "${PROJECT_NAME}")
set(APPLICATION_MAIN_VERSION "0.${LIB_MAJOR}.${LIB_MINOR}.${LIB_RELEASE}")

if (APPLICATION_STABLE)
	set(APPLICATION_STABLE_RELEASE ".${LIB_SUB_RELEASE}")
	set(APPLICATION_VERSION "${APPLICATION_MAIN_VERSION}.${LIB_SUB_RELEASE}")
	set(GENTOO_VERSION "${APPLICATION_MAIN_VERSION}.${LIB_SUB_RELEASE}")
else (APPLICATION_APPLICATION_STABLE "")
	set(STABLE_RELEASE)
	set(APPLICATION_VERSION "${APPLICATION_MAIN_VERSION}-${LIB_SUB_RELEASE}")
	set(GENTOO_VERSION "${APPLICATION_MAIN_VERSION}_pre${LIB_SUB_RELEASE}")
endif (APPLICATION_STABLE)

set(PACKAGE_VERSION ${APPLICATION_VERSION})

set(STRIGI_VERSION "0.3.11")
set(GENTOO_KEYWORDS "x86 ~ppc ~amd64")


##### user requested modules ####################

option( BUILD_ALL "Build all" OFF )
option( BUILD_DOC "Build doc" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
option( USE_STRIGI "Enable use of Strigi search support (disabled)" OFF )
option( USE_MENUDRAKE "Use 'menudrake' instead of 'kmenuedit' in Mandriva (auto)" ON )


##### configure checks ##########################

include( ConfigureChecks.cmake )


###### global compiler settings #################

add_definitions(
  -DHAVE_CONFIG_H
)

set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS} -DTQT_THREAD_SUPPORT" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )


##### source directories ########################

add_subdirectory( kbfxlib )
add_subdirectory( src )
add_subdirectory( configdialog )
add_subdirectory( skin )
add_subdirectory( images )
add_subdirectory( plugins )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS )


##### write configure files #####################

configure_file(config.h.cmake config.h @ONLY)