Browse Source

Added old KDE3 version of kbfx

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kbfx@1091549 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
commit
ceea23677c
  1. 274
      CMakeLists.txt
  2. 246
      build.sh
  3. 22
      cmakemodules/COPYING-CMAKE-SCRIPTS
  4. 21
      cmakemodules/CheckCXXCompilerFlag.cmake
  5. 49
      cmakemodules/FindGNUWIN32.cmake
  6. 32
      cmakemodules/FindKBFX.cmake
  7. 40
      cmakemodules/FindKDE4.cmake
  8. 839
      cmakemodules/FindKDE4Internal.cmake
  9. 89
      cmakemodules/FindKDEWIN32.cmake
  10. 316
      cmakemodules/FindKdeLibs.cmake
  11. 1081
      cmakemodules/FindQt4.cmake
  12. 47
      cmakemodules/FindStrigi.cmake
  13. 352
      cmakemodules/FindX11.cmake
  14. 392
      cmakemodules/KDE3Macros.cmake
  15. 854
      cmakemodules/KDE4Macros.cmake
  16. 19
      cmakemodules/MacroAddCompileFlags.cmake
  17. 20
      cmakemodules/MacroAddFileDependencies.cmake
  18. 18
      cmakemodules/MacroAddLinkFlags.cmake
  19. 21
      cmakemodules/MacroAdditionalCleanFiles.cmake
  20. 20
      cmakemodules/MacroBoolTo01.cmake
  21. 16
      cmakemodules/MacroEnsureOutOfSourceBuild.cmake
  22. 35
      cmakemodules/MacroEnsureVersion.cmake
  23. 18
      cmakemodules/MacroLibrary.cmake
  24. 112
      cmakemodules/MacroLogFeature.cmake
  25. 27
      cmakemodules/MacroOptionalAddSubdirectory.cmake
  26. 28
      cmakemodules/MacroOptionalFindPackage.cmake
  27. 47
      cmakemodules/MacroPushRequiredVars.cmake
  28. 16
      cmakemodules/generatelibtoolfile.cmake
  29. 20
      cmakemodules/kde3uic.cmake
  30. 50
      cmakemodules/kdesvnMacros.cmake
  31. 36
      cmakemodules/makedist.sh.in
  32. 84
      cmakemodules/package_messages.sh.in
  33. 4
      config.h.in
  34. 57
      configdialog/CMakeLists.txt
  35. 22
      configdialog/kbfx_install_theme.desktop
  36. 23
      configdialog/kbfx_prepare_theme.desktop
  37. 18
      configdialog/kbfx_theme.desktop
  38. 416
      configdialog/kbfxconfigapp.cpp
  39. 36
      configdialog/kbfxconfigapp.desktop
  40. 159
      configdialog/kbfxconfigapp.h
  41. 16
      configdialog/kbfxconfigapp.lsm
  42. 8
      configdialog/kbfxconfigappui.rc
  43. 727
      configdialog/kbfxconfigdlgabout.ui
  44. 159
      configdialog/kbfxconfigdlgabout.ui.h
  45. 1275
      configdialog/kbfxconfigdlgbutton.ui
  46. 183
      configdialog/kbfxconfigdlgbutton.ui.h
  47. 1193
      configdialog/kbfxconfigdlgfonts-old.ui
  48. 204
      configdialog/kbfxconfigdlgfonts-old.ui.h
  49. 1084
      configdialog/kbfxconfigdlglayout.ui
  50. 641
      configdialog/kbfxconfigdlglayout.ui.h
  51. 670
      configdialog/kbfxconfigdlgmain.ui
  52. 24
      configdialog/kbfxconfigdlgmain.ui.h
  53. 390
      configdialog/kbfxconfigdlgplugins.ui
  54. 157
      configdialog/kbfxconfigdlgplugins.ui.h
  55. 505
      configdialog/kbfxconfigdlgstyle.ui
  56. 30
      configdialog/kbfxconfigdlgstyle.ui.h
  57. 1032
      configdialog/kbfxconfigdlgthemes.ui
  58. 367
      configdialog/kbfxconfigdlgthemes.ui.h
  59. 719
      configdialog/kbfxconfigdlgtooltip.ui
  60. 86
      configdialog/kbfxconfigdlgtooltip.ui.h
  61. 603
      configdialog/kbfxthemeinfo.ui
  62. 19
      configdialog/kbfxthemeinfo.ui.h
  63. 163
      configdialog/main.cpp
  64. 20
      configdialog/x-kbfxtheme.desktop
  65. 26
      doc/AUTHORS
  66. 17
      doc/CMakeLists.txt
  67. 346
      doc/COPYING
  68. 11
      doc/CREDITS
  69. 123
      doc/ChangeLog
  70. 21
      doc/HACKING
  71. 411
      doc/HOWTO
  72. 203
      doc/INSTALL
  73. 1
      doc/KNOWN_BUGS
  74. 351
      doc/LICENSE
  75. 37
      doc/NEWS
  76. 44
      doc/README
  77. 62
      doc/TODO
  78. 5
      doc/common/CMakeLists.txt
  79. BIN
      doc/common/kbfx-about.jpg
  80. BIN
      doc/common/kbfx-fonts.jpg
  81. BIN
      doc/common/kbfx-layout.jpg
  82. BIN
      doc/common/kbfx-maindescription.jpg
  83. BIN
      doc/common/kbfx-plugins.jpg
  84. BIN
      doc/common/kbfx-startbutton.jpg
  85. BIN
      doc/common/kbfx-style.jpg
  86. BIN
      doc/common/kbfx-themes.jpg
  87. BIN
      doc/common/kbfx-tooltip.jpg
  88. 2
      doc/en/CMakeLists.txt
  89. 2456
      doc/en/index.docbook.in
  90. 5
      images/CMakeLists.txt
  91. BIN
      images/hi128-app-kbfx.png
  92. BIN
      images/hi16-app-kbfxconfigapp.png
  93. BIN
      images/hi32-app-kbfxconfigapp.png
  94. 31
      kbfx-0.4.9.3.1.ebuild
  95. 27
      kbfx-9999.ebuild
  96. 27
      kbfx-svn.ebuild.in
  97. 31
      kbfx.ebuild.in
  98. 255
      kbfx.spec
  99. 255
      kbfx.spec.in
  100. 48
      kbfxlib/common/CMakeLists.txt
  101. 862
      kbfxlib/common/kbfxconfig.cpp
  102. 295
      kbfxlib/common/kbfxconfig.h
  103. 79
      kbfxlib/common/kbfxfontchooser.cpp
  104. 70
      kbfxlib/common/kbfxfontchooser.h
  105. 78
      kbfxlib/common/kbfxkiodownload.cpp
  106. 75
      kbfxlib/common/kbfxkiodownload.h
  107. 92
      kbfxlib/common/kbfxpixmaplabel.cpp
  108. 53
      kbfxlib/common/kbfxpixmaplabel.h
  109. 146
      kbfxlib/common/kbfxplasmapixmapprovider.cpp
  110. 53
      kbfxlib/common/kbfxplasmapixmapprovider.h
  111. 48
      kbfxlib/common/kbfxpushbutton.cpp
  112. 41
      kbfxlib/common/kbfxpushbutton.h
  113. 90
      kbfxlib/common/kbfxthemesdata.cpp
  114. 52
      kbfxlib/common/kbfxthemesdata.h
  115. 48
      kbfxlib/data/CMakeLists.txt
  116. 92
      kbfxlib/data/kbfxdatagroup.cpp
  117. 100
      kbfxlib/data/kbfxdatagroup.h
  118. 54
      kbfxlib/data/kbfxdatagrouplist.cpp
  119. 52
      kbfxlib/data/kbfxdatagrouplist.h
  120. 89
      kbfxlib/data/kbfxdatasource.cpp
  121. 151
      kbfxlib/data/kbfxdatasource.h
  122. 84
      kbfxlib/data/kbfxdatastack.cpp
  123. 64
      kbfxlib/data/kbfxdatastack.h
  124. 29
      kbfxlib/data/kbfxplasmadataplugin.cpp
  125. 29
      kbfxlib/data/kbfxplasmadataplugin.h
  126. 161
      kbfxlib/data/kbfxplasmapluginloader.cpp
  127. 79
      kbfxlib/data/kbfxplasmapluginloader.h
  128. 115
      kbfxlib/data/kbfxplugin.cpp
  129. 74
      kbfxlib/data/kbfxplugin.h
  130. 14
      patches/001.patch
  131. 44
      plugins/applications/CMakeLists.txt
  132. 224
      plugins/applications/kbfxplasmadataplugin.cpp
  133. 3
      plugins/common/CMakeLists.txt
  134. 37
      plugins/common/kbfxplasmadataplugin-common.h
  135. 44
      plugins/plasmoids/CMakeLists.txt
  136. 152
      plugins/plasmoids/kbfxplasmadatapluginplosmoid.cpp
  137. 44
      plugins/recentstuff/CMakeLists.txt
  138. 150
      plugins/recentstuff/kbfxplasmarecentstuff.cpp
  139. 44
      plugins/settings/CMakeLists.txt
  140. 189
      plugins/settings/kbfxplasmadatapluginsettings.cpp
  141. 46
      plugins/strigi/CMakeLists.txt
  142. 225
      plugins/strigi/kbfxstrigiplugin.cpp
  143. 42
      plugins/strigi/kbfxstrigiplugin.h
  144. 1
      po/CMakeLists.txt
  145. 1649
      po/bg.po
  146. 1616
      po/hu.po
  147. 1591
      po/it.po
  148. 1551
      po/nl.po
  149. 4
      skin/raster/2panels/CMakeLists.txt
  150. BIN
      skin/raster/2panels/appfind.png
  151. BIN
      skin/raster/2panels/bg.png
  152. BIN
      skin/raster/2panels/bg_sidebar.png
  153. BIN
      skin/raster/2panels/botbg.png
  154. BIN
      skin/raster/2panels/butterfly.png
  155. BIN
      skin/raster/2panels/dudebox.png
  156. BIN
      skin/raster/2panels/fancymenuitem.png
  157. BIN
      skin/raster/2panels/find.png
  158. BIN
      skin/raster/2panels/hover.png
  159. BIN
      skin/raster/2panels/indexseparator.png
  160. 15
      skin/raster/2panels/kbfxfontrc
  161. 66
      skin/raster/2panels/kbfxlayoutrc
  162. BIN
      skin/raster/2panels/listboxbg.png
  163. BIN
      skin/raster/2panels/lock.png
  164. BIN
      skin/raster/2panels/lockhover.png
  165. BIN
      skin/raster/2panels/logo.png
  166. BIN
      skin/raster/2panels/logout.png
  167. BIN
      skin/raster/2panels/logouthover.png
  168. BIN
      skin/raster/2panels/mask.png
  169. BIN
      skin/raster/2panels/menu_main_white_bg.png
  170. BIN
      skin/raster/2panels/menu_top.png
  171. BIN
      skin/raster/2panels/menu_top_image_person.png
  172. BIN
      skin/raster/2panels/middleboxbg.png
  173. BIN
      skin/raster/2panels/mystatus_bg.png
  174. BIN
      skin/raster/2panels/normal.png
  175. BIN
      skin/raster/2panels/off.png
  176. BIN
      skin/raster/2panels/on.png
  177. BIN
      skin/raster/2panels/pressed.png
  178. BIN
      skin/raster/2panels/preview.png
  179. BIN
      skin/raster/2panels/rhshovertile.png
  180. BIN
      skin/raster/2panels/rhstile.png
  181. BIN
      skin/raster/2panels/scrollnormal.png
  182. BIN
      skin/raster/2panels/scrollnormalbot.png
  183. BIN
      skin/raster/2panels/separator.png
  184. BIN
      skin/raster/2panels/separator2.png
  185. BIN
      skin/raster/2panels/sidebar_top.png
  186. BIN
      skin/raster/2panels/tabbg.png
  187. BIN
      skin/raster/2panels/tilehover.png
  188. BIN
      skin/raster/2panels/tilenormal.png
  189. BIN
      skin/raster/2panels/toolbuttonnormal.png
  190. BIN
      skin/raster/2panels/top_bg.png
  191. BIN
      skin/raster/2panels/topbg.png
  192. 5
      skin/raster/2panels/version-2
  193. 4
      skin/raster/default/CMakeLists.txt
  194. BIN
      skin/raster/default/appfind.png
  195. BIN
      skin/raster/default/appviewbg.png
  196. BIN
      skin/raster/default/bg.png
  197. BIN
      skin/raster/default/botbg.png
  198. BIN
      skin/raster/default/butterfly.png
  199. BIN
      skin/raster/default/dudebox.png
  200. BIN
      skin/raster/default/find.png
  201. BIN
      skin/raster/default/hover.png
  202. BIN
      skin/raster/default/indexseparator.png
  203. 15
      skin/raster/default/kbfxfontrc
  204. 26
      skin/raster/default/kbfxlayoutrc
  205. BIN
      skin/raster/default/listboxbg.png
  206. BIN
      skin/raster/default/lock.png
  207. BIN
      skin/raster/default/lockhover.png
  208. BIN
      skin/raster/default/logo.png
  209. BIN
      skin/raster/default/logout.png
  210. BIN
      skin/raster/default/logouthover.png
  211. BIN
      skin/raster/default/mask.png
  212. BIN
      skin/raster/default/menu_top.png
  213. BIN
      skin/raster/default/menu_top_image_person.png
  214. BIN
      skin/raster/default/middleboxbg.png
  215. BIN
      skin/raster/default/normal.png
  216. BIN
      skin/raster/default/off.png
  217. BIN
      skin/raster/default/on.png
  218. BIN
      skin/raster/default/pressed.png
  219. BIN
      skin/raster/default/preview.png
  220. BIN
      skin/raster/default/rhshovertile.png
  221. BIN
      skin/raster/default/rhstile.png
  222. BIN
      skin/raster/default/scrollnormal.png
  223. BIN
      skin/raster/default/scrollnormalbot.png
  224. BIN
      skin/raster/default/separator.png
  225. BIN
      skin/raster/default/tabbg.png
  226. BIN
      skin/raster/default/tilehover.png
  227. BIN
      skin/raster/default/tilenormal.png
  228. BIN
      skin/raster/default/tooltip_dudebox.png
  229. BIN
      skin/raster/default/tooltip_logo.png
  230. BIN
      skin/raster/default/tooltip_mask.png
  231. BIN
      skin/raster/default/tooltip_window.png
  232. BIN
      skin/raster/default/topbg.png
  233. 5
      skin/raster/default/version-2
  234. 0
      skin/vector/CMakeLists.txt
  235. 62
      src/CMakeLists.txt
  236. 417
      src/kbfxbutton.cpp
  237. 113
      src/kbfxbutton.h
  238. 130
      src/kbfxplasmacanvasabstractitem.cpp
  239. 103
      src/kbfxplasmacanvasabstractitem.h
  240. 330
      src/kbfxplasmacanvasgroup.cpp
  241. 95
      src/kbfxplasmacanvasgroup.h
  242. 213
      src/kbfxplasmacanvasgroupview.cpp
  243. 86
      src/kbfxplasmacanvasgroupview.h
  244. 401
      src/kbfxplasmacanvasitem.cpp
  245. 141
      src/kbfxplasmacanvasitem.h
  246. 81
      src/kbfxplasmacanvasitem_events.cpp
  247. 23
      src/kbfxplasmacanvasitem_events.h
  248. 125
      src/kbfxplasmacanvasitemwrapper.cpp
  249. 49
      src/kbfxplasmacanvasitemwrapper.h
  250. 22
      src/kbfxplasmacanvasrtti.h
  251. 179
      src/kbfxplasmacanvasstack.cpp
  252. 89
      src/kbfxplasmacanvasstack.h
  253. 38
      src/kbfxplasmacanvasstackdata.h
  254. 665
      src/kbfxplasmacanvasview.cpp
  255. 124
      src/kbfxplasmacanvasview.h
  256. 182
      src/kbfxplasmaindexitem.cpp
  257. 68
      src/kbfxplasmaindexitem.h
  258. 436
      src/kbfxplasmaindexview.cpp
  259. 94
      src/kbfxplasmaindexview.h
  260. 38
      src/kbfxsignal.h
  261. 327
      src/kbfxspinx.cpp
  262. 17
      src/kbfxspinx.desktop
  263. 108
      src/kbfxspinx.h
  264. 513
      src/kbfxspinxmenu.cpp
  265. 126
      src/kbfxspinxmenu.h
  266. 70
      src/kbfxspinxpopup.cpp
  267. 58
      src/kbfxspinxpopup.h
  268. 142
      src/kbfxspinxscrollbar.cpp
  269. 76
      src/kbfxspinxscrollbar.h
  270. 67
      src/kbfxspinxtoolbar.cpp
  271. 57
      src/kbfxspinxtoolbar.h
  272. 139
      src/kbfxspinxtoolbutton.cpp
  273. 94
      src/kbfxspinxtoolbutton.h
  274. 123
      src/kbfxspinxtop.cpp
  275. 71
      src/kbfxspinxtop.h
  276. 35
      src/kbfxspinxview.cpp
  277. 41
      src/kbfxspinxview.h
  278. 306
      src/kbfxtooltip.cpp
  279. 93
      src/kbfxtooltip.h
  280. 91
      strigi-0.3.11.ebuild
  281. 91
      strigi.ebuild.in

274
CMakeLists.txt

@ -0,0 +1,274 @@
PROJECT(kbfx)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2 FATAL_ERROR)
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmakemodules)
SET(CMAKE_COLOR_MAKEFILE ON CACHE STRING "Enable/Disable color output during build." FORCE)
#SET(CMAKE_VERBOSE_MAKEFILE OFF CACHE STRING "Enable/Disable cmake debug output during build." FORCE)
# Optimization flags
# SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O3")
# SET(CMAKE_C_FLAGS_DISTRIBUTION "-O3")
# Global variable CMAKE_BUILD_TYPE
# None (CMAKE_C_FLAGS or CMAKE_CXX_FLAGS used)
# Debug (CMAKE_C_FLAGS_DEBUG or CMAKE_CXX_FLAGS_DEBUG)
# Release (CMAKE_C_FLAGS_RELEASE or CMAKE_CXX_FLAGS_RELEASE)
# RelWithDebInfo (CMAKE_C_FLAGS_RELWITHDEBINFO or CMAKE_CXX_FLAGS_RELWITHDEBINFO
# MinSizeRel (CMAKE_C_FLAGS_MINSIZEREL or CMAKE_CXX_FLAGS_MINSIZEREL)
IF (NOT CMAKE_BUILD_TYPE)
SET(CMAKE_BUILD_TYPE RelWithDebInfo
CACHE
STRING "Specify build type: None Debug Release RelWithDebInfo MinSizeRel."
FORCE)
ENDIF (NOT CMAKE_BUILD_TYPE)
OPTION(USE_STRIGI "Enable use of Strigi search support (disabled)" OFF)
OPTION(USE_MENUDRAKE "Use 'menudrake' instead of 'kmenuedit' in Mandriva (auto)" ON)
OPTION(USE_KDE4 "Compile for KDE4 (disabled)" OFF)
SET(BIN_SEARCH_PATHES
$ENV{HOME}/bin
$ENV{HOME}/usr/bin
$ENV{KDEDIR}/bin
${CMAKE_INSTALL_PREFIX}/bin
/opt/kde/bin
/opt/kde3/bin
/opt/kde4/bin
/usr/kde/3.5/bin
/usr/bin
/usr/local/bin
/opt/bin
)
SET(INCLUDE_SEARCH_PATHES
$ENV{HOME}/include
$ENV{HOME}/usr/include
$ENV{KDEDIR}/include
/opt/kde/include
/opt/kde3/include
/opt/kde4/include
/usr/kde/3.5/include
/usr/include
/usr/local/include
/opt/include
${CMAKE_SYSTEM_INCLUDE_PATH}
)
SET(LIB_SEARCH_PATHES
$ENV{HOME}/lib
$ENV{HOME}/usr/lib
$ENV{KDEDIR}/lib
/opt/kde/lib
/opt/kde3/lib
/opt/kde4/lib
/usr/kde/3.5/lib
/usr/lib
/usr/local/lib
/opt/lib
)
# Setting versions
# 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(VERSION ${APPLICATION_VERSION})
SET(STRIGI_VERSION "0.3.11")
SET(GENTOO_KEYWORDS "x86 ~ppc ~amd64")
# Prepare docbook part
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doc/en/index.docbook.in ${CMAKE_BINARY_DIR}/doc/en/index.docbook @ONLY)
IF (USE_STRIGI)
FIND_PACKAGE(Strigi REQUIRED)
INCLUDE_DIRECTORIES(${STRIGI_INCLUDE_DIR})
MESSAGE(STATUS "Strigi support is: ON!")
ELSE (USE_STRIGI)
MESSAGE(STATUS "Strigi support is: OFF!")
ENDIF (USE_STRIGI)
FIND_PROGRAM(HAVE_MANDRAKE menudrake)
IF (HAVE_MANDRAKE AND USE_MENUDRAKE)
SET(MANDRAKE "1")
MESSAGE(STATUS "Will use 'menudrake' instead of 'kmenuedit'!")
ELSE (HAVE_MANDRAKE AND USE_MENUDRAKE)
SET(MANDRAKE "")
MESSAGE(STATUS "Will use 'kmenuedit'!")
ENDIF (HAVE_MANDRAKE AND USE_MENUDRAKE)
IF (NOT USE_KDE4)
MESSAGE(STATUS "Building for KDE3")
INCLUDE(TestCXXAcceptsFlag)
SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -DTESTING_RC=\"\\\"\${CMAKE_SOURCE_DIR}/configdialog/kbfxconfigappui.rc\\\"\"")
CHECK_CXX_ACCEPTS_FLAG("-fexceptions" CXX_EXCEPTION)
CHECK_CXX_ACCEPTS_FLAG("-fstack-protector" CXX_PROTECTOR)
FIND_PACKAGE(KDE3 REQUIRED)
INCLUDE(FindKdeLibs)
INCLUDE(MacroEnsureVersion)
# Dummy macros for compatibility
MACRO(KDE4_AUTOMOC _dummy)
ENDMACRO(KDE4_AUTOMOC)
MACRO(KDE4_ADD_LIBRARY _dummy _dummy1 _dummy2)
ENDMACRO(KDE4_ADD_LIBRARY)
MACRO(KDE4_INSTALL_LIBTOOL_FILE _dummy _dummy1)
ENDMACRO(KDE4_INSTALL_LIBTOOL_FILE)
MACRO(KDE4_ADD_UI3_FILES _dummy _dummy1)
ENDMACRO(KDE4_ADD_UI3_FILES)
MACRO(KDE4_ADD_DCOP_SKELS _dummy _dummy1)
ENDMACRO(KDE4_ADD_DCOP_SKELS)
MACRO(KDE4_ADD_EXECUTABLE _dummy _dummy1)
ENDMACRO(KDE4_ADD_EXECUTABLE)
MACRO(KDE4_INSTALL_ICONS _dummy)
ENDMACRO(KDE4_INSTALL_ICONS)
ELSE (NOT USE_KDE4)
MESSAGE(STATUS "Building for KDE4")
FIND_PACKAGE(KDE4 REQUIRED)
ADD_DEFINITIONS(${KDE4_DEFINITIONS} ${QT_DEFINITIONS})
SET(INCLUDE_SEARCH_PATHES
${INCLUDE_SEARCH_PATHES}
${KDE4_INCLUDES}
)
SET(LIB_SEARCH_PATHES
${LIB_SEARCH_PATHES}
${KDE4_LIB_DIR}
)
ENDIF (NOT USE_KDE4)
INCLUDE_DIRECTORIES(
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/kbfxlib/data
${CMAKE_BINARY_DIR}/kbfxlib/common
${CMAKE_BINARY_DIR}/src
${CMAKE_BINARY_DIR}/configdialog
${CMAKE_BINARY_DIR}/plugins/common
${CMAKE_SOURCE_DIR}
${CMAKE_SOURCE_DIR}/kbfxlib/data
${CMAKE_SOURCE_DIR}/kbfxlib/common
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/configdialog
${CMAKE_SOURCE_DIR}/plugins/common
${KDE3_INCLUDE_DIR}/kbfx
${KDE3_INCLUDE_DIR}/kbfx/plugins
${INCLUDE_SEARCH_PATHES}
)
IF (NOT USE_KDE4)
IF (CXX_EXCEPTION)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions")
ENDIF (CXX_EXCEPTION)
IF (CXX_PROTECTOR)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector")
ENDIF (CXX_PROTECTOR)
ADD_DEFINITIONS(${KDE3_DEFINITIONS} ${QT_DEFINITIONS})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
IF(KDE3_KDECONFIG_EXECUTABLE)
EXECUTE_PROCESS(COMMAND ${KDE3_KDECONFIG_EXECUTABLE} "--version" OUTPUT_VARIABLE output)
STRING(REGEX MATCH "KDE: [0-9]+\\.[0-9]+\\.[0-9]+" KDEVERSION "${output}")
STRING(REGEX REPLACE "^KDE: " "" KDEVERSION "${KDEVERSION}")
ENDIF(KDE3_KDECONFIG_EXECUTABLE)
SET(KDE_MIN_VERSION "3.5.0")
MACRO_ENSURE_VERSION(${KDE_MIN_VERSION} ${KDEVERSION} VERSION_OK)
IF(NOT VERSION_OK)
MESSAGE(FATAL_ERROR "You need at least KDE Version of 3.5.0 in order to compile KBFX.\n Please upgrade your KDE or install the development files of KDE.")
ENDIF(NOT VERSION_OK)
ENDIF (NOT USE_KDE4)
SET(KBFX_LIB_INSTALL_DIR ${LIB_INSTALL_DIR})
ADD_SUBDIRECTORY(kbfxlib/data)
ADD_SUBDIRECTORY(kbfxlib/common)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(configdialog)
ADD_SUBDIRECTORY(skin/vector)
ADD_SUBDIRECTORY(skin/raster/default)
ADD_SUBDIRECTORY(skin/raster/2panels)
ADD_SUBDIRECTORY(images)
ADD_SUBDIRECTORY(doc)
ADD_SUBDIRECTORY(doc/en)
ADD_SUBDIRECTORY(doc/common)
ADD_SUBDIRECTORY(po)
ADD_SUBDIRECTORY(plugins/common)
ADD_SUBDIRECTORY(plugins/applications)
ADD_SUBDIRECTORY(plugins/settings)
ADD_SUBDIRECTORY(plugins/plasmoids)
ADD_SUBDIRECTORY(plugins/recentstuff)
IF (USE_STRIGI)
ADD_SUBDIRECTORY(plugins/strigi)
ENDIF (USE_STRIGI)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/config.h.in ${CMAKE_BINARY_DIR}/config.h @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kbfx.spec.in ${CMAKE_BINARY_DIR}/kbfx.spec @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kbfx.ebuild.in ${CMAKE_BINARY_DIR}/kbfx-${GENTOO_VERSION}.ebuild @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/strigi.ebuild.in ${CMAKE_BINARY_DIR}/strigi-${STRIGI_VERSION}.ebuild @ONLY)
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/kbfx-svn.ebuild.in ${CMAKE_BINARY_DIR}/kbfx-9999.ebuild @ONLY)
SET(DIST_INCLUDE "kbfx-9999.ebuild kbfx.spec kbfx-${GENTOO_VERSION}.ebuild strigi-${STRIGI_VERSION}.ebuild")
SET(DIST_EXCLUDE "Helperstuff")
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/makedist.sh.in"
"${CMAKE_CURRENT_BINARY_DIR}/makedist.sh"
IMMEDIATE
@ONLY)
ADD_CUSTOM_TARGET(dist
"${CMAKE_BINARY_DIR}/makedist.sh"
WORKING_DIRECTORY ${CMAKE_BINARY_DIR})
IF (NOT USE_KDE4)
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
ADD_CUSTOM_TARGET(uninstall
"${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
ENDIF (NOT USE_KDE4)
FILE(GLOB _POFILES po/*.po)
FOREACH(_p ${_POFILES})
SET(POFILES "${_p} ${POFILES}")
ENDFOREACH(_p)
SET(MESSAGES_DIR ${CMAKE_SOURCE_DIR})
CONFIGURE_FILE(
"${CMAKE_CURRENT_SOURCE_DIR}/cmakemodules/package_messages.sh.in"
"${CMAKE_CURRENT_BINARY_DIR}/package_messages.sh"
IMMEDIATE
@ONLY)
ADD_CUSTOM_TARGET(package-messages
"${CMAKE_CURRENT_BINARY_DIR}/package_messages.sh")

246
build.sh

@ -0,0 +1,246 @@
#! /bin/sh
CMAKE_OPT_PREFIX_KDE3="-DCMAKE_INSTALL_PREFIX:PATH=`kde-config --prefix 2>/dev/null` "
CMAKE_OPT_PREFIX_KDE4="-DCMAKE_INSTALL_PREFIX:PATH=`kde4-config --prefix 2>/dev/null` "
CMAKE_OPT_PREFIX=""
MAKE_VERBOSE=""
USE_STRIGI_SEARCH=""
MENUDRAKE=""
KDE4=""
ACTION="install"
NOCHECK=0
build_state="touch kbfx_build"
command_line_args=$@
eval "which kbfxconfigapp > /dev/null 2>&1" && kbfx_installed="1" || kbfx_installed="0"
color_ok="\\033[1;32m"
color_error="\\033[1;31m"
color_normal="\\033[0;39m"
color_warn="\\033[1;33m"
prog_action(){
echo
echo -e "$color_ok $@ $color_normal"
}
prog_err(){
echo
echo -e "$color_error ERROR doing $@ $color_normal\n"
}
confirm() {
printf "$color_warn %s (Y)es/(N)o? [%s]$color_normal " "$1" "$2"
unset user_input
answer="$2"
read user_input
if [ "$user_input" = "y" -o "$user_input" = "Y" -o "$user_input" = "YES" -o "$user_input" = "Yes" -o "$user_input" = "yes" ]; then
answer="Y"
fi
if [ "$user_input" = "n" -o "$user_input" = "N" -o "" = "NO" -o "$user_input" = "No" -o "$user_input" = "no" ]; then
answer="N"
fi
}
parse_command_line() {
if [ "$#" -eq 0 ]; then
return 0
fi
while [ "$1" != "${1##-}" ]; do
case $1 in
--verbose|-v)
MAKE_VERBOSE="VERBOSE=1"
shift 1
;;
--prefix|-p)
if [ -n "$2" -a "$2" = "${2##-}" ]; then
t=0
stop=0
s=""
for p in $@
do
t=$[t+1]
if [ $t -gt 1 -a "$p" = "${p##-}" -a $stop -eq 0 ]; then
s="$s$p "
fi
if [ $t -gt 1 -a "$p" != "${p##-}" ]; then
stop=$[t-1]
fi
done
if [ $stop -eq 0 ]; then
stop=$[t-1]
fi
if [ -n "$s" ]; then
s=${s%%[ ]}
CMAKE_OPT_PREFIX="-DCMAKE_INSTALL_PREFIX:PATH='$s' "
fi
shift $stop
else
shift 1
return 1
fi
;;
--strigi|-s)
USE_STRIGI_SEARCH="-DUSE_STRIGI:BOOL=TRUE"
shift 1
;;
--menudrake-off|-m)
MENUDRAKE="-DUSE_MENUDRAKE:BOOL=FALSE"
shift 1
;;
--kde4|-k)
KDE4="-DUSE_KDE4:BOOL=TRUE"
shift 1
;;
--uninstall|-u)
ACTION="uninstall"
shift 1
;;
--nocheck|-n)
NOCHECK=1
shift 1
;;
*)
if [ "$#" -ge 1 ]; then
return 1
fi
return 0
;;
esac
done
}
show_usage(){
echo
echo -e "$color_warn Usage: \n\t build.sh \t [(-v|--verbose) Be verbose when compiling (default: no)] \n\t\t\t [(-u|--uninstall) Uninstall KBFX (default: no)] \n\t\t\t [(-p|--prefix) Install prefix (default: KDE prefix)] \n\t\t\t [(-s|--strigi) Compile strigi search plugin (default: no)] \n\t\t\t [(-m|-menudrake-off) Don't use menudrake in Mandriva (default: auto)] \n\t\t\t [(-k|--kde4) Compile for KDE4 (default: no)] \n\t\t\t [(-n|--nocheck) Do not check for old KBFX versions (default: check)] $color_normal"
echo
}
parse_command_line $command_line_args
if [ "$?" -eq 1 ]; then
prog_err "build.sh"
show_usage
exit 1
fi
show_usage
if [ "$ACTION" = "install" ]
then {
if [ $kbfx_installed -eq 1 -a $NOCHECK -eq 0 ] ; then
echo
echo -e "$color_error \n\t You have KBFX installed in your \$PATH!\n\t In order to compile the new version you HAVE TO REMOVE the old KBFX first!\n $color_normal"
exit 1
fi
if [ -d build ] ; then
echo
echo -e "$color_warn Directory 'build' exists! Using it...$color_normal"
echo -e "$color_error If 'build.sh' fails, try removing the directory 'build' and run 'build.sh' again! $color_normal"
else
mkdir build
fi
cd build
if [ "$CMAKE_OPT_PREFIX" = "" ]
then {
if [ "$KDE4" = "" ]
then {
CMAKE_OPT_PREFIX=$CMAKE_OPT_PREFIX_KDE3
}
else {
CMAKE_OPT_PREFIX=$CMAKE_OPT_PREFIX_KDE4
}
fi
}
fi
CMAKE_OPT="$CMAKE_OPT_PREFIX $KDE4 $MENUDRAKE $USE_STRIGI_SEARCH"
prog_action "Doing CMake configure..."
echo $CMAKE_OPT
eval "cmake ../ $CMAKE_OPT"
if [ $? -ne 0 ]; then
prog_err "CMake configure..."
exit 1
fi
prog_action "Doing make..."
make $MAKE_VERBOSE
if [ $? -ne 0 ]; then
prog_err "make..."
exit 1
fi
eval $build_state
prog_action "Success building KBFX...\n"
confirm "Do you want to install KBFX?" "Y"
if [ "$answer" = "Y" ]
then
sucommand="make install"
after_su="touch kbfx_install_user"
if [ `whoami` != 'root' ]
then {
confirm "To install KBFX as 'root', answer 'Yes'. To install as '`whoami`', answer 'No'" "N"
if [ "$answer" = "Y" ]
then {
sucommand="su root -c 'make install'"
after_su="touch kbfx_install_root"
}
fi
}
fi
prog_action "Doing 'make install'..."
eval $sucommand
if [ $? -ne 0 ]; then
prog_err "make install..."
exit 1
fi
eval $after_su
echo
echo -e "$color_warn NOTE: If you have used a custom prefix for your install (-p or --prefix option for script), \n you should add '$s' to your \$KDEDIRS environment variable\n and '$s/lib' to your \$LD_LIBRARY_PATH environment variable!\n $color_normal"
fi
}
else {
if [ -d build ]
then
cd build
else
echo
echo -e "$color_error \n\t Directory 'build' DOES NOT exist!\n\t You HAVE NOT used 'build.sh' script for installing KBFX! \n\t Uninstall CAN NOT continue!\n $color_normal"
exit 1
fi
if [ -f kbfx_install_user ]
then
sucommand="make uninstall"
after_su="rm -f kbfx_install_user"
elif [ -f kbfx_install_root ]
then
sucommand="su root -c 'make uninstall'"
after_su="rm -f kbfx_install_root"
elif [ -f kbfx_build ]
then
echo
echo -e "$color_error \n\t KBFX IS NOT installed! \n\t Uninstall CAN NOT continue!\n $color_normal"
exit 1
else
echo
echo -e "$color_error \n\t You HAVE NOT used 'build.sh' script for installing KBFX! \n\t Uninstall CAN NOT continue!\n $color_normal"
exit 1
fi
prog_action "Uninstalling..."
eval $sucommand
if [ $? -ne 0 ]; then
prog_err "uninstall..."
exit 1
fi
eval $after_su
}
fi
prog_action "All actions ended successfully...\n"

22
cmakemodules/COPYING-CMAKE-SCRIPTS

@ -0,0 +1,22 @@
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

21
cmakemodules/CheckCXXCompilerFlag.cmake

@ -0,0 +1,21 @@
# - Check whether the CXX compiler supports a given flag.
# CHECK_CXX_COMPILER_FLAG(FLAG VARIABLE)
#
# FLAG - the compiler flag
# VARIABLE - variable to store the result
# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
INCLUDE(CheckCXXSourceCompiles)
MACRO (CHECK_CXX_COMPILER_FLAG _FLAG _RESULT)
SET(SAFE_CMAKE_REQUIRED_DEFINITIONS "${CMAKE_REQUIRED_DEFINITIONS}")
SET(CMAKE_REQUIRED_DEFINITIONS "${_FLAG}")
CHECK_CXX_SOURCE_COMPILES("int main() { return 0;}" ${_RESULT})
SET (CMAKE_REQUIRED_DEFINITIONS "${SAFE_CMAKE_REQUIRED_DEFINITIONS}")
ENDMACRO (CHECK_CXX_COMPILER_FLAG)

49
cmakemodules/FindGNUWIN32.cmake

@ -0,0 +1,49 @@
# Copyright (c) 2006, Peter Kuemmel, <syntheticpp@yahoo.com>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if (WIN32)
# check if GNUWIN32_DIR is already set
# (e.g. by command line argument or the calling script)
if(NOT GNUWIN32_DIR)
# check for enviroment variable
file(TO_CMAKE_PATH "$ENV{GNUWIN32_DIR}" GNUWIN32_DIR)
if(NOT GNUWIN32_DIR)
# search in the default program install folder
file(TO_CMAKE_PATH "$ENV{PROGRAMFILES}" _progFiles)
find_file(GNUWIN32_DIR_tmp gnuwin32 win32libs
PATHS
"${_progFiles}"
"C:/" "D:/" "E:/" "F:/" "G:/"
)
set(GNUWIN32_DIR ${GNUWIN32_DIR_tmp})
endif(NOT GNUWIN32_DIR)
endif(NOT GNUWIN32_DIR)
if (GNUWIN32_DIR)
set(GNUWIN32_INCLUDE_DIR ${GNUWIN32_DIR}/include)
set(GNUWIN32_LIBRARY_DIR ${GNUWIN32_DIR}/lib)
set(GNUWIN32_BINARY_DIR ${GNUWIN32_DIR}/bin)
set(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} ${GNUWIN32_INCLUDE_DIR})
set(CMAKE_LIBRARY_PATH ${CMAKE_LIBRARY_PATH} ${GNUWIN32_LIBRARY_DIR})
set(GNUWIN32_FOUND TRUE)
else (GNUWIN32_DIR)
set(GNUWIN32_FOUND)
endif (GNUWIN32_DIR)
if (GNUWIN32_FOUND)
if (NOT GNUWIN32_FIND_QUIETLY)
message(STATUS "Found GNUWIN32: ${GNUWIN32_DIR}")
endif (NOT GNUWIN32_FIND_QUIETLY)
else (GNUWIN32_FOUND)
if (GNUWIN32_FIND_REQUIRED)
message(FATAL_ERROR "Could NOT find GNUWIN32")
endif (GNUWIN32_FIND_REQUIRED)
endif (GNUWIN32_FOUND)
endif (WIN32)

32
cmakemodules/FindKBFX.cmake

@ -0,0 +1,32 @@
# - Try to find the KBFX package -
# If found the following will be defined
#
# KBFX_FOUND - KBFX package found on the system
# KBFX_INCLUDE_DIR - Directory of the KBFX package include files
# KBFX_LIBRARY - Where libkbfxplasma.so resides
#
FIND_PATH(KBFX_INCLUDE_DIR kbfx/kbfxconfig.h
PATHS
${INCLUDE_SEARCH_PATHES}
)
FIND_LIBRARY(KBFX_LIBRARY NAMES kbfxplasma
PATHS
${LIB_SEARCH_PATHES}
)
IF(KBFX_INCLUDE_DIR AND KBFX_LIBRARY)
SET(KBFX_FOUND TRUE)
ENDIF(KBFX_INCLUDE_DIR AND KBFX_LIBRARY)
IF(KBFX_FOUND)
IF(NOT KBFX_FIND_QUIETLY)
MESSAGE(STATUS "Found KBFX package: ${KBFX_LIBRARY}")
ENDIF(NOT KBFX_FIND_QUIETLY)
ELSE(KBFX_FOUND)
IF(KBFX_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could not find KBFX package! Please download and install KBFX from http://www.kbfx.org")
ENDIF(KBFX_FIND_REQUIRED)
ENDIF(KBFX_FOUND)

40
cmakemodules/FindKDE4.cmake

@ -0,0 +1,40 @@
# Find KDE4 and provide all necessary variables and macros to compile software for it.
# It looks for KDE 4 in the following directories in the given order:
# - CMAKE_INSTALL_PREFIX
# - KDEDIR
# - /opt/kde4
# - /opt/kde
#
# Please look in FindKDE4Internal.cmake and KDE4Macros.cmake for more information.
# They are installed with the KDE 4 libraries in $KDEDIR/share/apps/cmake/modules/.
#
# Author: Alexander Neundorf <neundorf@kde.org>
# Modified by PhobosK <phobosk@mail.kbfx.org>
# For KDE4 kde-config has been renamed to kde4-config
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config
PATHS
${BIN_SEARCH_PATHES}
NO_DEFAULT_PATH)
IF (NOT KDE4_KDECONFIG_EXECUTABLE)
FIND_PROGRAM(KDE4_KDECONFIG_EXECUTABLE NAMES kde4-config )
ENDIF (NOT KDE4_KDECONFIG_EXECUTABLE)
IF (KDE4_KDECONFIG_EXECUTABLE)
IF (KDE4_FIND_QUIETLY)
SET(_quiet QUIET)
ENDIF (KDE4_FIND_QUIETLY)
IF (KDE4_FIND_REQUIRED)
SET(_req REQUIRED)
ENDIF (KDE4_FIND_REQUIRED)
# use FindKDE4Internal.cmake to do the rest
FIND_PACKAGE(KDE4Internal ${_req} ${_quiet})
ELSE (KDE4_KDECONFIG_EXECUTABLE)
IF (KDE4_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "ERROR: Could not find KDE4 kde4-config")
ENDIF (KDE4_FIND_REQUIRED)
ENDIF (KDE4_KDECONFIG_EXECUTABLE)

839
cmakemodules/FindKDE4Internal.cmake

@ -0,0 +1,839 @@
# - Find the KDE4 include and library dirs, KDE preprocessors and define a some macros
#
# This module defines the following variables:
#
# KDE4_FOUND - set to TRUE if everything required for building KDE software has been found
#
# KDE4_DEFINITIONS - compiler definitions required for compiling KDE software
# KDE4_INCLUDE_DIR - the KDE 4 include directory
# KDE4_INCLUDES - all include directories required for KDE, i.e.
# KDE4_INCLUDE_DIR, but also the Qt4 include directories
# and other platform specific include directories
# KDE4_LIB_DIR - the directory where the KDE libraries are installed,
# intended to be used with LINK_DIRECTORIES()
#
# The following variables are defined for the various tools required to
# compile KDE software:
#
# KDE4_KCFGC_EXECUTABLE - the kconfig_compiler executable
# KDE4_MEINPROC_EXECUTABLE - the meinproc executable
# KDE4_MAKEKDEWIDGETS_EXECUTABLE - the makekdewidgets executable
#
# The following variables point to the location of the KDE libraries,
# but shouldn't be used directly:
#
# KDE4_KDECORE_LIBRARY - the kdecore library
# KDE4_KDEUI_LIBRARY - the kdeui library
# KDE4_KIO_LIBRARY - the kio library
# KDE4_KPARTS_LIBRARY - the kparts library
# KDE4_KUTILS_LIBRARY - the kutils library
# KDE4_KDE3SUPPORT_LIBRARY - the kde3support library
# KDE4_KXMLCORE_LIBRARY - the kxmlcore library
# KDE4_KHTML_LIBRARY - the khtml library
# KDE4_KJS_LIBRARY - the kjs library
# KDE4_KNEWSTUFF_LIBRARY - the knewstuff library
# KDE4_KDEPRINT_LIBRARY - the kdeprint library
# KDE4_KSPELL2_LIBRARY - the kspell2 library
# KDE4_KDNSSD_LIBRARY - the kdnssd library
# KDE4_PHONONCORE_LIBRARY - the phononcore library
# KDE4_PHONONUI_LIBRARY - the phononui library
# KDE4_KAUDIODEVICELIST_LIBRARY - the kaudiodevicelist library
# KDE4_KDEFX_LIBRARY - the kdefx library
# KDE4_THREADWEAVER_LIBRARY- the threadweaver library
# KDE4_SOLID_LIBRARY - the solid library
# KDE4_SOLIDIFACES_LIBRARY - the solidiface library
# KDE4_KNOTIFYCONFIG_LIBRARY- the knotifyconfig library
# KDE4_KROSSCORE_LIBRARY- the krosscore library
# KDE4_KTEXTEDITOR_LIBRARY - the ktexteditor library
# KDE4_KWALLETCLIENT_LIBRARY - the kwalletclient library
#
# Compared to the variables above, the following variables
# also contain all of the depending libraries, so the variables below
# should be used instead of the ones above:
#
# KDE4_KDECORE_LIBS - the kdecore library and all depending libraries
# KDE4_KDEUI_LIBS - the kdeui library and all depending libraries
# KDE4_KIO_LIBS - the kio library and all depending libraries
# KDE4_KPARTS_LIBS - the kparts library and all depending libraries
# KDE4_KUTILS_LIBS - the kutils library and all depending libraries
# KDE4_KDE3SUPPORT_LIBS - the kde3support library and all depending libraries
# KDE4_KXMLCORE_LIBS - the kxmlcore library and all depending libraries
# KDE4_KHTML_LIBS - the khtml library and all depending libraries
# KDE4_KJS_LIBS - the kjs library and all depending libraries
# KDE4_KNEWSTUFF_LIBS - the knewstuff library and all depending libraries
# KDE4_KDEPRINT_LIBS - the kdeprint library and all depending libraries
# KDE4_KSPELL2_LIBS - the kspell2 library and all depending libraries
# KDE4_KDNSSD_LIBS - the kdnssd library and all depending libraries
# KDE4_KDESU_LIBS - the kdesu library and all depending libraries
# KDE4_PHONONCORE_LIBS - the phononcore library and all depending librairies
# KDE4_PHONONUI_LIBRARIES - the phononui library and all depending librairies
# KDE4_KDEFX_LIBS - the kdefx library and all depending librairies
# KDE4_THREADWEAVER_LIBRARIES- the threadweaver library and all depending libraries
# KDE4_SOLID_LIBS - the solid library and all depending libraries
# KDE4_SOLIDIFACES_LIBS - the solid iface library and all depending libraries
# KDE4_KNOTIFYCONFIG_LIBS - the knotify config library and all depending libraries
# KDE4_KROSSCORE_LIBS - the kross core library and all depending libraries
# KDE4_KTEXTEDITOR_LIBS - the ktexteditor library and all depending libraries
# KDE4_KWALLETCLIENT_LIBS - the kwallet client library and all depending libraries
#
# This module defines a bunch of variables used as locations
# for install directories. They are all interpreted relative
# to CMAKE_INSTALL_PREFIX
#
# BIN_INSTALL_DIR - the directory where executables be installed (default is prefix/bin)
# SBIN_INSTALL_DIR - the directory where system executables will be installed (default is prefix/sbin)
# LIB_INSTALL_DIR - the directory where libraries will be installed (default is prefix/lib)
# CONFIG_INSTALL_DIR - the config file install dir
# DATA_INSTALL_DIR - the parent directory where applications can install their data
# HTML_INSTALL_DIR - the HTML install dir for documentation
# ICON_INSTALL_DIR - the icon install dir (default prefix/share/icons/)
# INFO_INSTALL_DIR - the kde info install dir (default prefix/info)
# KCFG_INSTALL_DIR - the install dir for kconfig files
# LOCALE_INSTALL_DIR - the install dir for translations
# MAN_INSTALL_DIR - the kde man page install dir (default prefix/man/)
# MIME_INSTALL_DIR - the install dir for the mimetype desktop files
# PLUGIN_INSTALL_DIR - the subdirectory relative to the install prefix where plugins will be installed (default is ${KDE4_LIB_INSTALL_DIR}/kde4)
# SERVICES_INSTALL_DIR - the install dir for service (desktop, protocol, ...) files
# SERVICETYPES_INSTALL_DIR - the install dir for servicestypes desktop files
# SOUND_INSTALL_DIR - the install dir for sound files
# TEMPLATES_INSTALL_DIR - the install dir for templates (Create new file...)
# WALLPAPER_INSTALL_DIR - the install dir for wallpapers
# KCONF_UPDATE_INSTALL_DIR - the kconf_update install dir
# XDG_APPS_DIR - the XDG apps dir
# XDG_DIRECTORY_DIR - the XDG directory
# DBUS_INTERFACES_DIR - the directory where dbus interfaces be installed (default is prefix/share/dbus-1/interfaces
#
# The following variables are provided, but are seem to be unused:
# LIBS_HTML_INSTALL_DIR /share/doc/HTML CACHE STRING "Is this still used ?")
# APPLNK_INSTALL_DIR /share/applnk CACHE STRING "Is this still used ?")
#
# The following user adjustable options are provided:
#
# KDE4_ENABLE_FINAL - enable KDE-style enable-final all-in-one-compilation
# KDE4_BUILD_TESTS - enable this to build the testcases
# KDE4_ENABLE_FPIE - enable it to use gcc Position Independent Executables feature
#
# It also adds the following macros (from KDE4Macros.cmake)
# KDE4_ADD_UI_FILES (SRCS_VAR file1.ui ... fileN.ui)
# Use this to add Qt designer ui files to your application/library.
#
# KDE4_ADD_UI3_FILES (SRCS_VAR file1.ui ... fileN.ui)
# Use this to add Qt designer ui files from Qt version 3 to your application/library.
#
# KDE4_ADD_KCFG_FILES (SRCS_VAR [GENERATE_MOC] file1.kcfgc ... fileN.kcfgc)
# Use this to add KDE config compiler files to your application/library.
# Use optional GENERATE_MOC to generate moc if you use signals in your kcfg files.
#
# KDE4_ADD_WIDGET_FILES (SRCS_VAR file1.widgets ... fileN.widgets)
# Use this to add widget description files for the makekdewidgets code generator
# for Qt Designer plugins.
#
# KDE4_AUTOMOC(file1 ... fileN)
# Call this if you want to have automatic moc file handling.
# This means if you include "foo.moc" in the source file foo.cpp
# a moc file for the header foo.h will be created automatically.
# You can set the property SKIP_AUTOMAKE using SET_SOURCE_FILES_PROPERTIES()
# to exclude some files in the list from being processed.
# If you don't want automoc, you can also use QT4_WRAP_CPP() or QT4_GENERATE_MOC()
# from FindQt4.cmake to have the moc files generated. This will be faster
# but require more manual work.
#
# KDE4_INSTALL_LIBTOOL_FILE ( subdir target )
# This will create and install a simple libtool file for the
# given target. This might be required for other software.
# The libtool file will be install in subdir, relative to CMAKE_INSTALL_PREFIX .
#
# KDE4_CREATE_FINAL_FILES (filename_CXX filename_C file1 ... fileN)
# This macro is intended mainly for internal uses.
# It is used for enable-final. It will generate two source files,
# one for the C files and one for the C++ files.
# These files will have the names given in filename_CXX and filename_C.
#
# KDE4_ADD_PLUGIN ( name [WITH_PREFIX] file1 ... fileN )
# Create a KDE plugin (KPart, kioslave, etc.) from the given source files.
# It supports KDE4_ENABLE_FINAL.
# If WITH_PREFIX is given, the resulting plugin will have the prefix "lib", otherwise it won't.
# It creates and installs an appropriate libtool la-file.
#
# KDE4_ADD_KDEINIT_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN)
# Create a KDE application in the form of a module loadable via kdeinit.
# A library named kdeinit_<name> will be created and a small executable which links to it.
# It supports KDE4_ENABLE_FINAL
# If the executable has to be run from the buildtree (e.g. unit tests and code generators
# used later on when compiling), set the option RUN_UNINSTALLED.
# If the executable doesn't have a GUI, use the option NOGUI. By default on OS X
# application bundles are created, with the NOGUI option no bundles but simple executables
# are created. Currently it doesn't have any effect on other platforms.
#
# KDE4_ADD_EXECUTABLE (name [NOGUI] [RUN_UNINSTALLED] file1 ... fileN)
# Equivalent to ADD_EXECUTABLE(), but additionally adds support for KDE4_ENABLE_FINAL.
# If you don't need support for KDE4_ENABLE_FINAL, you can just use the
# normal ADD_EXECUTABLE().
# If the executable has to be run from the buildtree (e.g. unit tests and code generators
# used later on when compiling), set the option RUN_UNINSTALLED.
# If the executable doesn't have a GUI, use the option NOGUI. By default on OS X
# application bundles are created, with the NOGUI option no bundles but simple executables
# are created. Currently it doesn't have any effect on other platforms.
#
# KDE4_ADD_LIBRARY (name [STATIC | SHARED | MODULE ] file1 ... fileN)
# Equivalent to ADD_LIBRARY(), but additionally it supports KDE4_ENABLE_FINAL
# and under Windows it adds a -DMAKE_<name>_LIB definition to the compilation.
#
# KDE4_INSTALL_ICONS( path theme)
# Installs all png and svgz files in the current directory to the icon
# directoy given in path, in the subdirectory for the given icon theme.
#
# KDE4_CREATE_HANDBOOK( docbookfile )
# Create the handbook from the docbookfile (using meinproc)
#
# KDE4_INSTALL_HANDBOOK()
# Install the handbook documentation
#
# KDE4_CREATE_HTML_HANDBOOK( docbookfile )
# Create HTML version of the handbook from the docbookfile (using meinproc)
#
# _KDE4_PLATFORM_INCLUDE_DIRS is used only internally
# _KDE4_PLATFORM_DEFINITIONS is used only internally
#
#
# Copyright (c) 2006, Alexander Neundorf <neundorf@kde.org>
# Copyright (c) 2006, Laurent Montel, <montel@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
# Modified by PhobosK <phobosk@mail.kbfx.org>
INCLUDE (MacroEnsureVersion)
cmake_minimum_required(VERSION 2.4.3 FATAL_ERROR)
set(QT_MIN_VERSION "4.2.0")
#this line includes FindQt4.cmake, which searches the Qt library and headers
find_package(Qt4 REQUIRED)
if (NOT QT_DBUSXML2CPP_EXECUTABLE)
message(FATAL_ERROR "Qt4 qdbusxml2cpp was not found. Make sure it has been built and installed by Qt")
endif (NOT QT_DBUSXML2CPP_EXECUTABLE)
# Perl is required for building KDE software,
find_package(Perl REQUIRED)
# remove once we require cmake >= 2.4.4, then the REQUIRED flag is honored by FindPerl.cmake, Alex
if(NOT PERL_FOUND)
message(FATAL_ERROR "Perl was not found. Make sure it has installed on your system")
endif(NOT PERL_FOUND)
include (MacroLibrary)
include (CheckCXXCompilerFlag)
#add some KDE specific stuff
# the following are directories where stuff will be installed to
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )