compile
[kdegraphics.git] / CMakeLists.txt
blob42c240581c2f75ba659d6c4b98bfe36ab8893bb5
1 project(kdegraphics)
3 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules )
5 # search packages used by KDE
6 find_package(KDE4 REQUIRED)
7 find_package(Strigi REQUIRED)
8 include(KDE4Defaults)
9 include(MacroLibrary)
10 include(MacroOptionalAddSubdirectory)
11 if( WIN32 )
12 find_package( Expat )
13 endif( WIN32 )
15 #require by libs/libkdcraw, gwenview, and okular
16 find_package(JPEG REQUIRED)
18 macro_optional_find_package(QImageBlitz)
19 macro_log_feature(QIMAGEBLITZ_FOUND "QImageBlitz" "A a graphical effect and filter library for KDE4" "http://sourceforge.net/projects/qimageblitz" FALSE "kdesupport" "Required to build kolourpaint.")
21 macro_optional_find_package(Gphoto2)
22 macro_log_feature(GPHOTO2_FOUND "gphoto2" "A library and framework that lets you download images from several different digital camera models" "http://heanet.dl.sourceforge.net/sourceforge/gphoto" FALSE "" "Required to build the kamera project.")
24 macro_optional_find_package(Sane)
25 macro_log_feature(SANE_FOUND "SANE" "SANE libraries which are needed by applications that want to access scanners." "http://www.sane-project.org" FALSE "" "Provides scanning support for libksane and ksaneplugin.")
27 if(X11_FOUND)
28   #X11_xf86vmode discovery is done by FindX11
29   macro_log_feature(X11_xf86vmode_FOUND "X11 Video Mode Extension (xf86vm)" "An X11 extension providing access to detailed timings of video modes currently in use, and a means to modify them" "http://www.x.org" FALSE "" "X11 xvidmode extensions are needed to build kgamma.")
30 endif(X11_FOUND)
32 set(EXIV2_MIN_VERSION "0.18") # std::string Metadatum::print(const ExifData* pMetadata) const  was added in 0.18
33 macro_optional_find_package(Exiv2)
34 macro_log_feature(EXIV2_FOUND "Exiv2" "A library to access image metadata" "http://www.exiv2.org" FALSE "" "Required to build libkexiv2 and gwenview.")
36 macro_optional_find_package(JPEG)
37 macro_log_feature(JPEG_FOUND "JPEG" "A library for reading and writing JPEG image files." "http://www.ijg.org" FALSE "" "Required to build gwenview and also provides support fof PalmDB documents in okular.")
39 macro_optional_find_package(Kipi)
40 macro_log_feature(KIPI_FOUND "KIPI" "A library for adding kipi support" "http://www.kipi-plugins.org" FALSE "" "Required to build gwenview with kipi support.")
42 add_definitions (${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
43 include_directories (${QDBUS_INCLUDE_DIRS} ${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
46 add_subdirectory(cmake)
47 add_subdirectory(libs)
48 macro_optional_add_subdirectory(doc)
49 macro_optional_add_subdirectory(strigi-analyzer)
50 macro_optional_add_subdirectory(thumbnailers)
51 macro_optional_add_subdirectory(kcolorchooser)
52 macro_optional_add_subdirectory(kruler)
53 macro_optional_add_subdirectory(svgpart)
54 if(QIMAGEBLITZ_FOUND)
55   macro_optional_add_subdirectory(kolourpaint)
56   macro_optional_add_subdirectory(okular)
57 endif(QIMAGEBLITZ_FOUND)
59 if(Q_WS_X11)
60     macro_optional_add_subdirectory(ksnapshot)
61     if (X11_xf86vmode_FOUND)
62        macro_optional_add_subdirectory(kgamma)
63     endif (X11_xf86vmode_FOUND)
64 endif(Q_WS_X11)
66 if(KDE4_GPHOTO2 AND GPHOTO2_FOUND)
67    macro_optional_add_subdirectory(kamera)
68 endif(KDE4_GPHOTO2 AND GPHOTO2_FOUND)
70 if (SANE_FOUND)
71    macro_optional_add_subdirectory(ksaneplugin)
72 endif (SANE_FOUND)
74 if (EXIV2_FOUND)
75    macro_optional_add_subdirectory(gwenview)
76 endif (EXIV2_FOUND)
78 macro_display_feature_log()