CMakeLists.txt 4.26 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1 2 3 4
project(koffice)

set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )

5 6 7 8 9
# define the generic version of the KOffice libraries here
# this makes it easy to advance it when the next KOffice release comes
set(GENERIC_KOFFICE_LIB_VERSION "5.0.0")
set(GENERIC_KOFFICE_LIB_SOVERSION "5")

Laurent Montel's avatar
Laurent Montel committed
10 11
# search packages used by KDE
find_package(KDE4 REQUIRED)
12
include(KDE4Defaults)
Laurent Montel's avatar
Laurent Montel committed
13 14
find_package(Perl REQUIRED)
find_package(ZLIB REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
15
macro_optional_find_package(OpenEXR)
16
macro_optional_find_package(Exif)
17
macro_optional_find_package(PythonLibs)
18
macro_optional_find_package(LibArt)
Laurent Montel's avatar
Laurent Montel committed
19 20 21 22 23 24

if (APPLE)
   find_package(Carbon REQUIRED)
endif (APPLE)


25
add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1)
Laurent Montel's avatar
Laurent Montel committed
26 27 28 29 30 31
link_directories(${KDE4_LIB_DIR})


include (MacroAdditionalCleanFiles)
include (MacroAddFileDependencies)
include (ConfigureChecks.cmake)
Laurent Montel's avatar
Laurent Montel committed
32

Laurent Montel's avatar
Laurent Montel committed
33 34 35
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
#macro_additional_clean_files( ${CMAKE_CURRENT_BINARY_DIR}/config.h )

36
# for config.h and <toplevel/foo.h> includes (if any?)
37 38
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )

Adriaan de Groot's avatar
Adriaan de Groot committed
39
# flake is the lib that depends on nothing, but lots of the libs depend on flake
40
set(FLAKE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/flake ${CMAKE_BINARY_DIR}/libs/flake)
41
# kostore is at the bottom of stack, so it has the dependency on the kde4 includes.
42
set(KOSTORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/store ${CMAKE_BINARY_DIR}/libs/store ${KDE4_INCLUDES})
43
# kofficecore depends on kostore
44
set(KOFFICECORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficecore ${CMAKE_BINARY_DIR}/libs/kofficecore ${KOSTORE_INCLUDES})
45
# kofficeui depends on kofficecore
46
set(KOFFICEUI_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficeui ${CMAKE_BINARY_DIR}/libs/kofficeui ${KOFFICECORE_INCLUDES} ${FLAKE_INCLUDES} )
47 48
# pigment depends on kofficecore
set(PIGMENT_INCLUDES ${CMAKE_SOURCE_DIR}/libs/pigment ${CMAKE_SOURCE_DIR}/libs/pigment/colorspaces ${KOFFICECORE_INCLUDES} )
49 50 51 52

# The rest must be specified independently, in addition to one of the above three
set(KWMF_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kwmf ${CMAKE_BINARY_DIR}/libs/kwmf)
set(KOTEXT_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kotext ${CMAKE_BINARY_DIR}/libs/kotext)
53
set(KOPAINTER_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kopainter ${CMAKE_BINARY_DIR}/libs/kopainter ${CMAKE_SOURCE_DIR}/libs/pigment)
54 55 56 57 58
set(KOPALETTE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kopalette ${CMAKE_BINARY_DIR}/libs/kopalette)
set(KFORMULA_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kformula ${CMAKE_BINARY_DIR}/libs/kformula)
set(KROSS_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kross ${CMAKE_BINARY_DIR}/libs/kross)
# Those are included with e.g. <koproperty/set.h>
set(KOPROPERTY_INCLUDES ${CMAKE_SOURCE_DIR}/libs ${CMAKE_BINARY_DIR}/libs)
59

Laurent Montel's avatar
Laurent Montel committed
60
set(libkdgantt_SRCS
61
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttView.cpp
Laurent Montel's avatar
Laurent Montel committed
62 63 64 65 66 67 68 69 70 71 72 73 74 75
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewEventItem.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewItem.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewItemDrag.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewSubwidgets.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewSummaryItem.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewTaskItem.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewTaskLink.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttViewTaskLinkGroup.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttMinimizeSplitter.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttSemiSizingControl.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttSizingControl.cpp
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttXMLTools.cpp
	)

76
add_subdirectory(libs)
77
MESSAGE(STATUS "Before koffice-2.0 disable compile of example subdir, not necessary for official release")
78
add_subdirectory(example)
Laurent Montel's avatar
Laurent Montel committed
79
add_subdirectory(interfaces)
80
if(LIBART_FOUND)
Tim Beaulen's avatar
Tim Beaulen committed
81
#	add_subdirectory(karbon)
82
endif(LIBART_FOUND)
83
add_subdirectory(kdgantt)
Laurent Montel's avatar
Laurent Montel committed
84
add_subdirectory(kchart)
85
#add_subdirectory(kexi)
86
add_subdirectory(kformula)
87
add_subdirectory(kivio)
Laurent Montel's avatar
Laurent Montel committed
88
add_subdirectory(koshell)
89
add_subdirectory(kounavail)
90
add_subdirectory(kplato)
Laurent Montel's avatar
Laurent Montel committed
91
add_subdirectory(kpresenter)
92
add_subdirectory(krita)
Laurent Montel's avatar
Laurent Montel committed
93
add_subdirectory(kspread)
Laurent Montel's avatar
Laurent Montel committed
94
add_subdirectory(kugar)
95
add_subdirectory(kword)
Laurent Montel's avatar
Laurent Montel committed
96 97
add_subdirectory(mimetypes)
add_subdirectory(pics)
98
add_subdirectory(plugins)
Laurent Montel's avatar
Laurent Montel committed
99 100
add_subdirectory(servicetypes)
add_subdirectory(templates)
101 102 103 104
add_subdirectory(tools)
add_subdirectory(filters)
add_subdirectory(autocorrect)
add_subdirectory(doc)
Laurent Montel's avatar
Laurent Montel committed
105
add_subdirectory( cmake )
Laurent Montel's avatar
Laurent Montel committed
106
message( STATUS "Re-add kexi when we will port them")
Laurent Montel's avatar
Laurent Montel committed
107

108

Laurent Montel's avatar
Laurent Montel committed
109