CMakeLists.txt 4.37 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
find_package(KdepimLibs REQUIRED)
Laurent Montel's avatar
Laurent Montel committed
16
macro_optional_find_package(OpenEXR)
17
macro_optional_find_package(Exif)
18
macro_optional_find_package(PythonLibs)
19
macro_optional_find_package(LibArt)
Laurent Montel's avatar
Laurent Montel committed
20 21 22 23 24 25

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


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


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

Laurent Montel's avatar
Laurent Montel committed
34 35 36
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 )

37
# for config.h and <toplevel/foo.h> includes (if any?)
Laurent Montel's avatar
Laurent Montel committed
38
include_directories(${QDBUS_INCLUDE_DIRS}  ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )
39 40

# kostore is at the bottom of stack, so it has the dependency on the kde4 includes.
41
set(KOSTORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/store ${CMAKE_BINARY_DIR}/libs/store ${KDE4_INCLUDES})
42
# kofficecore depends on kostore
43
set(KOFFICECORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficecore ${CMAKE_BINARY_DIR}/libs/kofficecore ${KOSTORE_INCLUDES})
44 45
# flake depends on kofficecore
set(FLAKE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/flake ${CMAKE_BINARY_DIR}/libs/flake )
46
# kofficeui depends on kofficecore
47
set(KOFFICEUI_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficeui ${CMAKE_BINARY_DIR}/libs/kofficeui ${KOFFICECORE_INCLUDES} ${FLAKE_INCLUDES} )
48 49
# pigment depends on kofficecore and lcms
set(PIGMENT_INCLUDES ${CMAKE_SOURCE_DIR}/libs/pigment ${CMAKE_SOURCE_DIR}/libs/pigment/colorspaces ${LCMS_INCLUDE_DIR} )
50 51 52 53

# 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)
54
set(KOPAINTER_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kopainter ${CMAKE_BINARY_DIR}/libs/kopainter ${CMAKE_SOURCE_DIR}/libs/pigment)
55 56 57 58 59
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)
60

Laurent Montel's avatar
Laurent Montel committed
61
set(libkdgantt_SRCS
62
	${CMAKE_SOURCE_DIR}/kdgantt/KDGanttView.cpp
Laurent Montel's avatar
Laurent Montel committed
63 64 65 66 67 68 69 70 71 72 73 74 75 76
	${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
	)

77
add_subdirectory(libs)
78
MESSAGE(STATUS "Before koffice-2.0 disable compile of example subdir, not necessary for official release")
79
add_subdirectory(example)
Laurent Montel's avatar
Laurent Montel committed
80
add_subdirectory(interfaces)
81
add_subdirectory(karbon)
82
add_subdirectory(kdgantt)
Laurent Montel's avatar
Laurent Montel committed
83
add_subdirectory(kchart)
84
#add_subdirectory(kexi)
85
add_subdirectory(kformula)
86
add_subdirectory(kivio)
Laurent Montel's avatar
Laurent Montel committed
87
add_subdirectory(koshell)
88
add_subdirectory(kounavail)
89
add_subdirectory(kplato)
Laurent Montel's avatar
Laurent Montel committed
90
add_subdirectory(kpresenter)
91
add_subdirectory(krita)
Laurent Montel's avatar
Laurent Montel committed
92
add_subdirectory(kspread)
Laurent Montel's avatar
Laurent Montel committed
93
add_subdirectory(kugar)
94
add_subdirectory(kword)
Laurent Montel's avatar
Laurent Montel committed
95 96
add_subdirectory(mimetypes)
add_subdirectory(pics)
97
add_subdirectory(plugins)
Laurent Montel's avatar
Laurent Montel committed
98 99
add_subdirectory(servicetypes)
add_subdirectory(templates)
100 101
add_subdirectory(tools)
add_subdirectory(filters)
102
add_subdirectory(shapes)
103 104
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

Stefan Nikolaus's avatar
Stefan Nikolaus committed
109
ADD_CUSTOM_TARGET(apidox doc/api/gendocs.pl WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})