CMakeLists.txt 4.01 KB
Newer Older
Laurent Montel's avatar
Laurent Montel committed
1 2 3 4 5 6 7 8
project(koffice)

# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
# Perhaps define share/apps as ${DATA_INSTALL_DIR}
#set(CMAKE_MODULE_PATH "${KDEDIR}/share/apps/cmake/modules/ ${CMAKE_SOURCE_DIR}/cmake/modules")

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

9 10 11
# Always include srcdir and builddir in include path
set(CMAKE_INCLUDE_CURRENT_DIR ON)

Laurent Montel's avatar
Laurent Montel committed
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
# support for Dart: http://public.kitware.com/dashboard.php?name=kde
enable_testing()
include(CTest)

# search packages used by KDE
find_package(KDE4 REQUIRED)
find_package(Perl REQUIRED)
find_package(ZLIB REQUIRED)

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


add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS} -DHAVE_CONFIG_H=1)
link_directories(${KDE4_LIB_DIR})


include (MacroAdditionalCleanFiles)
include (MacroAddFileDependencies)
include (ConfigureChecks.cmake)

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 )

38
# for config.h and <toplevel/foo.h> includes (if any?)
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} )

# kostore is at the bottom of stack, so it has the dependency on the kde4 includes.
set(KOSTORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/store ${CMAKE_BINARY_DIR}/libs/store ${KDE4_INCLUDE_DIRS})
# kofficecore depends on kostore
set(KOFFICECORE_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficecore ${CMAKE_BINARY_DIR}/libs/kofficecore ${KOSTORE_INCLUDES})
# kofficeui depends on kofficecore
set(KOFFICEUI_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kofficeui ${CMAKE_BINARY_DIR}/libs/kofficeui ${KOFFICECORE_INCLUDES})

# 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)
set(KOPAINTER_INCLUDES ${CMAKE_SOURCE_DIR}/libs/kopainter ${CMAKE_BINARY_DIR}/libs/kopainter)
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)
57

Laurent Montel's avatar
Laurent Montel committed
58

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


80
add_subdirectory(libs)
Laurent Montel's avatar
Laurent Montel committed
81 82 83
#add_subdirectory(example)
add_subdirectory(interfaces)
#add_subdirectory(karbon)
84
add_subdirectory(kdgantt)
85
#add_subdirectory(kchart)
Laurent Montel's avatar
Laurent Montel committed
86 87 88 89
#add_subdirectory(kexi)
#add_subdirectory(kformula)
#add_subdirectory(kivio)
#add_subdirectory(koshell)
90
add_subdirectory(kounavail)
Laurent Montel's avatar
Laurent Montel committed
91 92 93
#add_subdirectory(kplato)
#add_subdirectory(kpresenter)
#add_subdirectory(krita)
Laurent Montel's avatar
Laurent Montel committed
94
add_subdirectory(kspread)
Laurent Montel's avatar
Laurent Montel committed
95
add_subdirectory(kugar)
Laurent Montel's avatar
Laurent Montel committed
96
#add_subdirectory(kword)
97
#add_subdirectory(ascend)
Laurent Montel's avatar
Laurent Montel committed
98 99
add_subdirectory(mimetypes)
add_subdirectory(pics)
100
add_subdirectory(plugins)
Laurent Montel's avatar
Laurent Montel committed
101 102
add_subdirectory(servicetypes)
add_subdirectory(templates)
103 104 105 106
add_subdirectory(tools)
add_subdirectory(filters)
add_subdirectory(autocorrect)
add_subdirectory(doc)
Laurent Montel's avatar
Laurent Montel committed
107 108 109 110 111
MESSAGE(STATUS "Perhaps not install FindKDE4. It will conflict when we install with rpm/deb package")
add_subdirectory( cmake )

kde4_create_doxygen_docs(  )