TDE core libraries
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1456 lines
47 KiB

10 years ago
10 years ago
  1. #################################################
  2. #
  3. # (C) 2010-2011 Serghei Amelian
  4. # serghei (DOT) amelian (AT) gmail.com
  5. #
  6. # Improvements and feedback are welcome
  7. #
  8. # This file is released under GPL >= 2
  9. #
  10. #################################################
  11. cmake_minimum_required( VERSION 2.8.12 )
  12. ##### general package setup #####################
  13. project( tdelibs )
  14. set( PACKAGE tdelibs )
  15. set( VERSION R14.1.0 )
  16. ##### include essential cmake modules ###########
  17. include( FindPkgConfig )
  18. include( CheckIncludeFile )
  19. include( CheckSymbolExists )
  20. include( CheckFunctionExists )
  21. include( CheckCSourceCompiles )
  22. include( CheckCXXSourceCompiles )
  23. include( CheckTypeSize )
  24. include( CheckCSourceRuns )
  25. include( CheckLibraryExists )
  26. ##### include our cmake modules #################
  27. set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
  28. include( TDEMacros )
  29. include( TDESetupPaths )
  30. ##### setup and find essential stuff ############
  31. tde_setup_paths( )
  32. tde_setup_architecture_flags( )
  33. enable_testing( )
  34. find_package( TQt )
  35. list( APPEND TDECORE_LIBRARY_DIRS ${TQT_LIBRARY_DIRS} )
  36. ##### add apidox targets ############
  37. if( "${CMAKE_VERSION}" VERSION_LESS "3.1" )
  38. set( CMAKE_ENV "env" )
  39. else()
  40. set( CMAKE_ENV "${CMAKE_COMMAND};-E;env" )
  41. endif()
  42. add_custom_target( apidox
  43. COMMAND ${CMAKE_ENV}
  44. "TQTDOCDIR=/usr/share/tqt3/doc/html"
  45. ${CMAKE_SOURCE_DIR}/admin/doxygen.sh
  46. --no-modulename
  47. ${CMAKE_SOURCE_DIR}
  48. COMMAND
  49. find ${CMAKE_BINARY_DIR}/apidocs -name '*.html' |
  50. xargs -r sed -i 's|${CMAKE_BINARY_DIR}/apidocs|${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs|g'
  51. COMMAND
  52. find ${CMAKE_BINARY_DIR}/apidocs -name '*.tag' |
  53. xargs -r sed -i 's|${CMAKE_SOURCE_DIR}/|${PROJECT_NAME}/|g'
  54. WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
  55. )
  56. add_custom_target( install-apidox
  57. COMMAND ${CMAKE_COMMAND} -E echo Apidox installed in ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs
  58. )
  59. install( CODE "
  60. if( EXISTS ${CMAKE_BINARY_DIR}/apidocs )
  61. file(
  62. INSTALL ${CMAKE_BINARY_DIR}/apidocs/
  63. DESTINATION ${HTML_INSTALL_DIR}/en/${PROJECT_NAME}-apidocs
  64. PATTERN doxygen_sqlite3.db EXCLUDE
  65. PATTERN installdox-slow EXCLUDE
  66. )
  67. endif()"
  68. )
  69. ##### user requested OPTIONs ####################
  70. OPTION( WITH_ALL_OPTIONS "Enable all OPTIONal support" OFF )
  71. OPTION( TDE_MALLOC "Use own malloc implementation" OFF )
  72. OPTION( TDE_MALLOC_DEBUG "Enable debugging in fast malloc" OFF )
  73. OPTION( TDE_MALLOC_FULL "Make alloc as fast as possible" OFF )
  74. OPTION( WITH_ARTS "Build with aRts" ON )
  75. OPTION( WITH_ALSA "Enable ALSA support" ON )
  76. OPTION( WITH_LIBART "Enable libart support (for SVG icons)" ${WITH_ALL_OPTIONS} )
  77. OPTION( WITH_LIBIDN "Enable support for libidn" ${WITH_ALL_OPTIONS} )
  78. OPTION( WITH_SSL "Enable support for SSL" ON )
  79. OPTION( WITH_CUPS "Enable CUPS support" ON )
  80. OPTION( WITH_IMAGETOPS_BINARY "Enable installation of imagetops binary" ${WITH_ALL_OPTIONS} )
  81. OPTION( WITH_LUA "Enable LUA support" ${WITH_ALL_OPTIONS} )
  82. OPTION( WITH_TIFF "Enable tiff support" ${WITH_ALL_OPTIONS} )
  83. OPTION( WITH_JASPER "Enable jasper (jpeg2k) support" ${WITH_ALL_OPTIONS} )
  84. OPTION( WITH_OPENEXR "Enable openexr support" ${WITH_ALL_OPTIONS} )
  85. OPTION( WITH_UTEMPTER "Use utempter for utmp management" ${WITH_ALL_OPTIONS} )
  86. OPTION( WITH_AVAHI "Enable AVAHI support" ${WITH_ALL_OPTIONS} )
  87. OPTION( WITH_ELFICON "Enable ELF embedded icon support" ${WITH_ALL_OPTIONS} )
  88. OPTION( WITH_PCRE "Enable pcre regex support for kjs" ON )
  89. OPTION( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
  90. OPTION( WITH_INOTIFY "Enable inotify support for tdeio" ON )
  91. OPTION( WITH_GAMIN "Enable FAM/GAMIN support" ${WITH_ALL_OPTIONS} )
  92. OPTION( WITH_TDEHWLIB "Enable TDE hwlib globally" ON )
  93. OPTION( WITH_TDEHWLIB_DAEMONS "Enable daemons for TDE hwlib" ${WITH_TDEHWLIB} )
  94. OPTION( WITH_HAL "Enable HAL support" OFF )
  95. OPTION( WITH_DEVKITPOWER "Enable DeviceKit Power support" OFF )
  96. OPTION( WITH_LOGINDPOWER "Enable Logind/Systemd Power support" OFF )
  97. OPTION( WITH_UPOWER "Enable uPower support" ${WITH_ALL_OPTIONS} )
  98. OPTION( WITH_UDISKS "Enable uDisks support" ${WITH_ALL_OPTIONS} )
  99. OPTION( WITH_UDISKS2 "Enable uDisks2 support" ${WITH_ALL_OPTIONS} )
  100. OPTION( WITH_UDEVIL "Enable udevil support" ${WITH_ALL_OPTIONS} )
  101. OPTION( WITH_CONSOLEKIT "Enable ConsoleKit support" ${WITH_ALL_OPTIONS} )
  102. OPTION( WITH_NETWORK_MANAGER_BACKEND "Enable network-manager support" OFF )
  103. OPTION( WITH_SUDO_TDESU_BACKEND "Use sudo as backend for tdesu (default is su)" OFF )
  104. OPTION( WITH_OLD_XDG_STD "Use the pre R14.0.0 XDG standard where both TDE and KDE are recognized in desktop files" OFF )
  105. OPTION( WITH_PCSC "Enable PC/SC SmartCard support" ${WITH_ALL_OPTIONS} )
  106. OPTION( WITH_PKCS "Enable PKCS support" ${WITH_ALL_OPTIONS} )
  107. OPTION( WITH_CRYPTSETUP "Enable cryptsetup support" ${WITH_ALL_OPTIONS} )
  108. OPTION( WITH_LZMA "Enable support for LZMA/XZ" ${WITH_ALL_OPTIONS} )
  109. OPTION( WITH_LIBBFD "Enable pretty backtraces with libbfd from GNU binutils" OFF )
  110. OPTION( WITH_XRANDR "Build the tderandr library" ON )
  111. OPTION( WITH_XCOMPOSITE "Enable xcomposite support" ON )
  112. OPTION( WITH_MITSHM "Use MIT-SHM for pixmap loading/saving" ${WITH_ALL_OPTIONS} )
  113. OPTION( WITH_KDE4_MENU_SUFFIX "Add [KDE4] tag to KDE4 menu items" OFF )
  114. OPTION( WITH_ISPELL "Enable ispell support" ON )
  115. OPTION( WITH_ASPELL "Enable aspell support" ${WITH_ALL_OPTIONS} )
  116. OPTION( WITH_HSPELL "Enable hspell support" ${WITH_ALL_OPTIONS} )
  117. OPTION( WITH_TDEICONLOADER_DEBUG "Enable debugging in TDEIconLoader class" OFF )
  118. ##### set PKG_CONFIG_PATH #######################
  119. set( ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:${PKGCONFIG_INSTALL_DIR}:${LIB_INSTALL_DIR}/pkgconfig:$ENV{PKG_CONFIG_PATH}" )
  120. ##### check for CPU architecture ################
  121. ### FIXME fast malloc is also available on x86_64 architecture?
  122. if( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
  123. set( TDE_MALLOC_X86 1 )
  124. message( STATUS "Found x86 architecture" )
  125. else( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
  126. if( TDE_MALLOC )
  127. message( FATAL_ERROR "\nKDE fast malloc is available only on x86 architecture" )
  128. endif( TDE_MALLOC )
  129. endif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" )
  130. ##### check for operating system ################
  131. if( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
  132. set( TDEINIT_SETUID 1 )
  133. set( TDEINIT_OOM_PROTECT 1 )
  134. endif( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
  135. ##### get the system's default path for libraries
  136. tde_save_and_set( CMAKE_INSTALL_PREFIX "/usr" )
  137. include( GNUInstallDirs OPTIONAL )
  138. if( CMAKE_INSTALL_LIBDIR )
  139. set( SYSTEM_LIBDIR "${CMAKE_INSTALL_LIBDIR}" )
  140. else( )
  141. set( SYSTEM_LIBDIR "lib${LIB_SUFFIX}" )
  142. endif( )
  143. tde_restore( CMAKE_INSTALL_PREFIX )
  144. ##### check for compiler capabilities ###########
  145. include( CheckCXXCompilerFlag )
  146. check_cxx_compiler_flag( -Woverloaded-virtual WOVERLOADED_VIRTUAL )
  147. if( WOVERLOADED_VIRTUAL )
  148. set( WOVERLOADED_VIRTUAL -Woverloaded-virtual )
  149. endif( WOVERLOADED_VIRTUAL )
  150. check_cxx_compiler_flag( -fno-builtin NO_BUILTIN )
  151. if( NO_BUILTIN )
  152. endif( NO_BUILTIN )
  153. ##### system checks #############################
  154. include(TestBigEndian)
  155. test_big_endian(WORDS_BIGENDIAN)
  156. tde_setup_largefiles( )
  157. tde_save_and_set( CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}/libltdl )
  158. check_include_file( "ltdl.h" HAVE_LTDL_H )
  159. if( NOT HAVE_LTDL_H )
  160. tde_message_fatal( "ltdl.h is required, but not found on your system" )
  161. endif( )
  162. tde_restore( CMAKE_REQUIRED_INCLUDES )
  163. check_include_file( "alloca.h" HAVE_ALLOCA_H )
  164. check_include_file( "arpa/nameser8_compat.h" HAVE_ARPA_NAMESER8_COMPAT_H )
  165. check_include_file( "awe_voice.h" HAVE_AWE_VOICE_H )
  166. check_include_file( "Carbon/Carbon.h" HAVE_CARBON_CARBON_H )
  167. check_include_file( "crt_externs.h" HAVE_CRT_EXTERNS_H )
  168. check_include_file( "ctype.h" HAVE_CTYPE_H )
  169. check_include_file( "dirent.h" HAVE_DIRENT_H )
  170. check_include_file( "dld.h" HAVE_DLD_H )
  171. check_include_file( "dlfcn.h" HAVE_DLFCN_H )
  172. check_include_file( "dl.h" HAVE_DL_H )
  173. check_include_file( "float.h" HAVE_FLOAT_H )
  174. check_include_file( "fstab.h" HAVE_FSTAB_H )
  175. check_include_file( "ieeefp.h" HAVE_IEEEFP_H )
  176. check_include_file( "inttypes.h" HAVE_INTTYPES_H )
  177. check_include_file( "libutil.h" HAVE_LIBUTIL_H )
  178. check_include_file( "limits.h" HAVE_LIMITS_H )
  179. check_include_file( "linux/awe_voice.h" HAVE_LINUX_AWE_VOICE_H )
  180. check_include_file( "locale.h" HAVE_LOCALE_H )
  181. check_include_file( "machine/soundcard.h" HAVE_MACHINE_SOUNDCARD_H )
  182. check_include_file( "malloc.h" HAVE_MALLOC_H )
  183. check_include_file( "memory.h" HAVE_MEMORY_H )
  184. check_include_file( "mntent.h" HAVE_MNTENT_H )
  185. check_include_file( "ndir.h" HAVE_NDIR_H )
  186. check_include_file( "netinet/in.h" HAVE_NETINET_IN_H )
  187. check_include_file( "net/if.h" HAVE_NET_IF_H )
  188. if( NOT HAVE_NET_IF_H )
  189. find_path( NET_IF_PATH "net/if.h" )
  190. if( NET_IF_PATH )
  191. set( HAVE_NET_IF_H "1" )
  192. endif( )
  193. endif( )
  194. check_include_file( "paths.h" HAVE_PATHS_H )
  195. check_include_file( "pty.h" HAVE_PTY_H )
  196. check_include_file( "stdint.h" HAVE_STDINT_H )
  197. check_include_file( "stdio.h" HAVE_STDIO_H )
  198. check_include_file( "stdlib.h" HAVE_STDLIB_H )
  199. check_include_file( "strings.h" HAVE_STRINGS_H )
  200. check_include_file( "string.h" HAVE_STRING_H )
  201. check_include_file( "sysent.h" HAVE_SYSENT_H )
  202. check_include_file( "sys/acl.h" HAVE_SYS_ACL_H )
  203. check_include_file( "sys/bitypes.h" HAVE_SYS_BITYPES_H )
  204. check_include_file( "sys/dir.h" HAVE_SYS_DIR_H )
  205. check_include_file( "sys/filio.h" HAVE_SYS_FILIO_H )
  206. check_include_file( "sys/mman.h" HAVE_SYS_MMAN_H )
  207. check_include_file( "sys/mntent.h" HAVE_SYS_MNTENT_H )
  208. check_include_file( "sys/mnttab.h" HAVE_SYS_MNTTAB_H )
  209. check_include_file( "sys/mount.h" HAVE_SYS_MOUNT_H )
  210. if( NOT HAVE_SYS_MOUNT_H )
  211. find_path( SYS_MOUNT_PATH "sys/mount.h" )
  212. if( SYS_MOUNT_PATH )
  213. set( HAVE_SYS_MOUNT_H "1" )
  214. endif( )
  215. endif( )
  216. check_include_file( "sys/ndir.h" HAVE_SYS_NDIR_H )
  217. check_include_file( "sys/param.h" HAVE_SYS_PARAM_H )
  218. check_include_file( "sys/prctl.h" HAVE_SYS_PRCTL_H )
  219. check_include_file( "sys/select.h" HAVE_SYS_SELECT_H )
  220. check_include_file( "sys/soundcard.h" HAVE_SYS_SOUNDCARD_H )
  221. check_include_file( "sys/stat.h" HAVE_SYS_STAT_H )
  222. check_include_file( "sys/stropts.h" HAVE_SYS_STROPTS_H )
  223. check_include_file( "sys/types.h" HAVE_SYS_TYPES_H )
  224. check_include_file( "sys/ucred.h" HAVE_SYS_UCRED_H )
  225. if( NOT HAVE_SYS_UCRED_H )
  226. find_path( SYS_UCRED_PATH "sys/ucred.h" )
  227. if( SYS_UCRED_PATH )
  228. set( HAVE_SYS_UCRED_H "1" )
  229. endif( )
  230. endif( )
  231. check_include_file( "sys/xattr.h" HAVE_SYS_XATTR_H )
  232. check_include_file( "termios.h" HAVE_TERMIOS_H )
  233. check_include_file( "termio.h" HAVE_TERMIO_H )
  234. check_include_file( "unistd.h" HAVE_UNISTD_H )
  235. check_include_file( "util.h" HAVE_UTIL_H )
  236. check_include_file( "values.h" HAVE_VALUES_H )
  237. # FIXME I'm not sure if test TIME_WITH_SYS_TIME are correct
  238. check_include_file( "sys/time.h" HAVE_SYS_TIME_H )
  239. check_include_file( "time.h" HAVE_TIME_H )
  240. if( HAVE_SYS_TIME_H AND HAVE_TIME_H )
  241. set( TIME_WITH_SYS_TIME 1 )
  242. endif( HAVE_SYS_TIME_H AND HAVE_TIME_H )
  243. if( HAVE_SYS_ACL_H )
  244. check_include_file( "acl/libacl.h" HAVE_ACL_LIBACL_H )
  245. if( HAVE_ACL_LIBACL_H )
  246. check_library_exists( acl acl_init "" HAVE_ACL_INIT )
  247. if( HAVE_ACL_INIT AND HAVE_SYS_XATTR_H )
  248. set( USE_POSIX_ACL 1 )
  249. set( HAVE_NON_POSIX_ACL_EXTENSIONS 1 )
  250. set( ACL_LIBRARIES acl attr )
  251. endif( HAVE_ACL_INIT AND HAVE_SYS_XATTR_H )
  252. else( HAVE_ACL_LIBACL_H )
  253. check_library_exists( c acl_init "" HAVE_ACL_INIT )
  254. if( HAVE_ACL_INIT )
  255. set( USE_POSIX_ACL 1 )
  256. set( ACL_LIBRARIES c )
  257. endif( HAVE_ACL_INIT )
  258. endif( HAVE_ACL_LIBACL_H )
  259. endif( HAVE_SYS_ACL_H )
  260. check_include_file( "valgrind/memcheck.h" HAVE_VALGRIND_MEMCHECK_H )
  261. check_include_file( "values.h" HAVE_VALUES_H )
  262. check_include_file( "X11/extensions/shape.h" HAVE_X11_EXTENSIONS_SHAPE_H )
  263. check_include_file( "/usr/src/sys/gnu/i386/isa/sound/awe_voice.h" HAVE__USR_SRC_SYS_GNU_I386_ISA_SOUND_AWE_VOICE_H )
  264. check_include_file( "/usr/src/sys/i386/isa/sound/awe_voice.h" HAVE__USR_SRC_SYS_I386_ISA_SOUND_AWE_VOICE_H )
  265. check_function_exists( random HAVE_RANDOM )
  266. check_symbol_exists( random "stdlib.h" HAVE_RANDOM_PROTO )
  267. check_function_exists( srandom HAVE_SRANDOM )
  268. check_symbol_exists( srandom "stdlib.h" HAVE_SRANDOM_PROTO )
  269. check_function_exists( seteuid HAVE_SETEUID )
  270. check_function_exists( setegid HAVE_SETEGID )
  271. check_function_exists( gethostname HAVE_GETHOSTNAME )
  272. check_symbol_exists( gethostname "unistd.h" HAVE_GETHOSTNAME_PROTO )
  273. check_function_exists( vsnprintf HAVE_VSNPRINTF )
  274. check_function_exists( snprintf HAVE_SNPRINTF )
  275. check_function_exists( setenv HAVE_SETENV )
  276. check_symbol_exists( setenv "stdlib.h" HAVE_SETENV_PROTO )
  277. check_function_exists( unsetenv HAVE_UNSETENV )
  278. check_symbol_exists( unsetenv "stdlib.h" HAVE_UNSETENV_PROTO )
  279. check_function_exists( mkdtemp HAVE_MKDTEMP )
  280. check_symbol_exists( mkdtemp "stdlib.h" HAVE_MKDTEMP_PROTO )
  281. check_function_exists( mkstemp HAVE_MKSTEMP )
  282. check_symbol_exists( mkstemp "stdlib.h" HAVE_MKSTEMP_PROTO )
  283. check_function_exists( mkstemps HAVE_MKSTEMPS )
  284. check_symbol_exists( mkstemps "stdlib.h" HAVE_MKSTEMPS_PROTO )
  285. check_function_exists( initgroups HAVE_INITGROUPS )
  286. check_symbol_exists( initgroups "grp.h;unistd.h" HAVE_INITGROUPS_PROTO )
  287. check_function_exists( strlcat HAVE_STRLCAT )
  288. check_symbol_exists( strlcat "string.h" HAVE_STRLCAT_PROTO )
  289. check_function_exists( strlcpy HAVE_STRLCPY )
  290. check_symbol_exists( strlcpy "string.h" HAVE_STRLCPY_PROTO )
  291. check_symbol_exists( S_ISSOCK "sys/stat.h" HAVE_S_ISSOCK )
  292. check_symbol_exists( gethostbyname2 "netdb.h" HAVE_GETHOSTBYNAME2 )
  293. check_symbol_exists( gethostbyname2_r "netdb.h" HAVE_GETHOSTBYNAME2_R )
  294. check_symbol_exists( gethostbyname_r "netdb.h" HAVE_GETHOSTBYNAME_R )
  295. check_symbol_exists( gai_strerror "sys/types.h;sys/socket.h;netdb.h" HAVE_GAI_STRERROR )
  296. check_symbol_exists( getaddrinfo "sys/types.h;sys/socket.h;netdb.h" HAVE_GETADDRINFO )
  297. if ( CMAKE_MAJOR_VERSION LESS "3" )
  298. check_symbol_exists( backtrace "execinfo.h" HAVE_BACKTRACE )
  299. if ( HAVE_BACKTRACE )
  300. set ( Backtrace_LIBRARY "" )
  301. set ( Backtrace_HEADER "execinfo.h" )
  302. endif ()
  303. else ()
  304. find_package( Backtrace )
  305. if ( Backtrace_FOUND )
  306. set ( HAVE_BACKTRACE 1 )
  307. endif ()
  308. endif ()
  309. check_cxx_source_compiles( "#include <cxxabi.h>
  310. int main() { abi::__cxa_demangle(0, 0, 0, 0); return 0; }"
  311. HAVE_ABI_CXA_DEMANGLE )
  312. # Some declarations are needed by demangle.h (libiberty.h) and/or bfd.h but we
  313. # will check them uncondionally
  314. # See WITH_LIBBFD also see binutils bugs 14243 and 14072
  315. # NOTE: those headers use HAVE_DECL_* names but we would follow our macro
  316. # naming style
  317. check_symbol_exists( basename "libgen.h" HAVE_BASENAME_PROTO )
  318. check_symbol_exists( ffs "string.h" HAVE_FFS_PROTO )
  319. check_symbol_exists( asprintf "stdio.h" HAVE_ASPRINTF_PROTO )
  320. check_symbol_exists( vasprintf "stdio.h" HAVE_VASPRINTF_PROTO )
  321. check_symbol_exists( snprintf "stdio.h" HAVE_SNPRINTF_PROTO )
  322. check_symbol_exists( vsnprintf "stdarg.h;stdio.h" HAVE_VSNPRINTF_PROTO )
  323. check_symbol_exists( strvercmp "string.h" HAVE_STRVERCMP_PROTO )
  324. check_function_exists( usleep HAVE_USLEEP )
  325. check_symbol_exists( usleep "unistd.h" HAVE_USLEEP_PROTO )
  326. if (HAVE_ALLOCA_H )
  327. check_symbol_exists( alloca "alloca.h" HAVE_ALLOCA )
  328. else (HAVE_ALLOCA_H )
  329. check_symbol_exists( alloca "stdlib.h" HAVE_ALLOCA )
  330. endif (HAVE_ALLOCA_H )
  331. if( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" )
  332. set( HAVE_ALLOCA 1 )
  333. endif( )
  334. check_function_exists( getmntinfo HAVE_GETMNTINFO )
  335. if( HAVE_GETMNTINFO )
  336. check_cxx_source_compiles("
  337. #include <sys/types.h>
  338. #include <sys/statvfs.h>
  339. int main(){
  340. struct statvfs *mntbufp;
  341. int flags;
  342. return getmntinfo(&mntbufp, flags);
  343. }"
  344. GETMNTINFO_USES_STATVFS )
  345. endif( HAVE_GETMNTINFO )
  346. check_function_exists( getnameinfo HAVE_GETNAMEINFO )
  347. check_function_exists( getpagesize HAVE_GETPAGESIZE )
  348. check_function_exists( getpeereid HAVE_GETPEEREID )
  349. check_function_exists( getpeername HAVE_GETPEERNAME )
  350. check_function_exists( getprotobyname_r HAVE_GETPROTOBYNAME_R )
  351. check_function_exists( getpt HAVE_GETPT )
  352. check_function_exists( getservbyname_r HAVE_GETSERVBYNAME_R )
  353. check_symbol_exists( getservbyname_r "netdb.h" HAVE_DECL_GETSERVBYNAME_R )
  354. check_function_exists( getservbyport_r HAVE_GETSERVBYPORT_R )
  355. check_function_exists( getsockname HAVE_GETSOCKNAME )
  356. check_function_exists( getsockopt HAVE_GETSOCKOPT )
  357. check_function_exists( gettimeofday HAVE_GETTIMEOFDAY )
  358. check_function_exists( grantpt HAVE_GRANTPT )
  359. check_function_exists( if_nametoindex HAVE_IF_NAMETOINDEX )
  360. check_function_exists( index HAVE_INDEX)
  361. check_function_exists( inet_ntop HAVE_INET_NTOP )
  362. check_function_exists( inet_pton HAVE_INET_PTON )
  363. check_function_exists( setfsent HAVE_SETFSENT )
  364. check_function_exists( setgroups HAVE_SETGROUPS )
  365. check_function_exists( setlocale HAVE_SETLOCALE )
  366. check_function_exists( setmntent HAVE_SETMNTENT )
  367. check_function_exists( setpriority HAVE_SETPRIORITY )
  368. check_function_exists( freeaddrinfo HAVE_FREEADDRINFO )
  369. check_function_exists( strtoll HAVE_STRTOLL )
  370. check_function_exists( socket HAVE_SOCKET )
  371. check_function_exists( strfmon HAVE_STRFMON )
  372. check_function_exists( stpcpy HAVE_STPCPY )
  373. check_function_exists( readdir_r HAVE_READDIR_R )
  374. check_function_exists( tcgetattr HAVE_TCGETATTR )
  375. check_function_exists( tcsetattr HAVE_TCSETATTR )
  376. check_function_exists( strcasecmp HAVE_STRCASECMP )
  377. check_function_exists( strchr HAVE_STRCHR )
  378. check_function_exists( strcmp HAVE_STRCMP )
  379. check_function_exists( strrchr HAVE_STRRCHR )
  380. check_function_exists( posix_openpt HAVE_POSIX_OPENPT )
  381. check_function_exists( ptsname HAVE_PTSNAME )
  382. check_function_exists( unlockpt HAVE_UNLOCKPT )
  383. check_function_exists( _getpty HAVE__GETPTY )
  384. check_function_exists( __argz_count HAVE___ARGZ_COUNT )
  385. check_function_exists( __argz_next HAVE___ARGZ_NEXT )
  386. check_function_exists( __argz_stringify HAVE___ARGZ_STRINGIFY )
  387. check_function_exists( sendfile HAVE_SENDFILE )
  388. check_function_exists( rindex HAVE_RINDEX )
  389. check_function_exists( putenv HAVE_PUTENV )
  390. check_function_exists( poll HAVE_POLL )
  391. check_function_exists( madvise HAVE_MADVISE )
  392. check_function_exists( getgroups HAVE_GETGROUPS )
  393. check_function_exists( getcwd HAVE_GETCWD )
  394. check_function_exists( dlerror HAVE_DLERROR )
  395. if( NOT HAVE_DLERROR )
  396. check_library_exists( dl dlerror "" HAVE_DLERROR_LIB )
  397. if( HAVE_DLERROR_LIB )
  398. set( HAVE_DLERROR 1 )
  399. set( DLERROR_LIBRARIES dl )
  400. endif( HAVE_DLERROR_LIB )
  401. endif( NOT HAVE_DLERROR )
  402. check_function_exists( crypt HAVE_CRYPT )
  403. if( NOT HAVE_CRYPT )
  404. check_library_exists( crypt crypt "" HAVE_CRYPT_LIB )
  405. if( HAVE_CRYPT_LIB )
  406. set( HAVE_CRYPT 1 )
  407. set( CRYPT_LIBRARIES crypt )
  408. endif( HAVE_CRYPT_LIB )
  409. endif( NOT HAVE_CRYPT )
  410. if( NOT HAVE_CRYPT )
  411. check_library_exists( c crypt "" HAVE_CRYPT_LIBC )
  412. if( HAVE_CRYPT_LIBC )
  413. set( HAVE_CRYPT 1 )
  414. set( CRYPT_LIBRARIES c )
  415. endif( HAVE_CRYPT_LIBC )
  416. endif( NOT HAVE_CRYPT )
  417. check_function_exists( mmap HAVE_MMAP )
  418. check_function_exists( munmap HAVE_MUNMAP )
  419. check_type_size( "char*" SIZEOF_CHAR_P )
  420. check_type_size( "int" SIZEOF_INT )
  421. check_type_size( "long" SIZEOF_LONG )
  422. check_type_size( "short" SIZEOF_SHORT )
  423. check_type_size( "size_t" SIZEOF_SIZE_T )
  424. check_type_size( "unsigned long" SIZEOF_UNSIGNED_LONG )
  425. set( CMAKE_EXTRA_INCLUDE_FILES "netdb.h" )
  426. check_type_size( "struct addrinfo" STRUCT_ADDRINFO )
  427. set( CMAKE_EXTRA_INCLUDE_FILES "netinet/in.h" )
  428. check_type_size( "struct sockaddr_in6" HAVE_STRUCT_SOCKADDR_IN6 )
  429. unset( CMAKE_EXTRA_INCLUDE_FILES )
  430. check_c_source_compiles("
  431. #include <features.h>
  432. #ifndef __GNU_LIBRARY__
  433. #error
  434. #endif
  435. int main(int argc, char *argv[]) { return 0; } "
  436. _GNU_SOURCE )
  437. check_c_source_compiles("
  438. #include <unistd.h>
  439. int main(int argc, char *argv[]) { revoke(\"/dev/tty\"); return 0; } "
  440. HAVE_REVOKE )
  441. check_c_source_runs("
  442. #include <sys/types.h>
  443. #include <sys/socket.h>
  444. #include <netdb.h>
  445. #include <string.h>
  446. int main()
  447. {
  448. struct addrinfo hint, *res;
  449. int err;
  450. memset(&hint, 0, sizeof(hint));
  451. hint.ai_family = AF_INET;
  452. hint.ai_protocol = 0;
  453. hint.ai_socktype = SOCK_STREAM;
  454. hint.ai_flags = AI_PASSIVE;
  455. err = getaddrinfo(0, \"18300\", &hint, &res); /* kxmlrpc tries this */
  456. if (err != 0 || res == 0 || res->ai_family != AF_INET)
  457. return 1;
  458. return 0;
  459. }"
  460. HAVE_GOOD_GETADDRINFO
  461. )
  462. if( NOT HAVE_GOOD_GETADDRINFO )
  463. set( HAVE_BROKEN_GETADDRINFO 1 )
  464. endif( NOT HAVE_GOOD_GETADDRINFO )
  465. # save CMAKE_REQUIRED_LIBRARIES
  466. set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
  467. set( CMAKE_REQUIRED_LIBRARIES resolv )
  468. check_c_source_compiles("
  469. #include <sys/types.h>
  470. #include <netinet/in.h>
  471. #include <arpa/nameser.h>
  472. #include <resolv.h>
  473. int main(int argc, char *argv[]) { res_init(); return 0; } "
  474. HAVE_RES_INIT )
  475. if( HAVE_RES_INIT )
  476. set( RESOLV_LIBRARIES resolv )
  477. endif( HAVE_RES_INIT)
  478. set( CMAKE_REQUIRED_LIBRARIES util )
  479. if( HAVE_PTY_H )
  480. set( USE_OPENPTY_H pty.h )
  481. elseif( HAVE_UTIL_H )
  482. set( USE_OPENPTY_H util.h )
  483. elseif( HAVE_LIBUTIL_H )
  484. set( USE_OPENPTY_H libutil.h )
  485. endif( )
  486. if( USE_OPENPTY_H )
  487. check_c_source_runs("
  488. #include <${USE_OPENPTY_H}>
  489. int main(int argc, char* argv[]) {
  490. int master_fd, slave_fd;
  491. int result;
  492. result = openpty(&master_fd, &slave_fd, 0, 0, 0);
  493. return 0;
  494. }"
  495. HAVE_OPENPTY
  496. )
  497. endif( )
  498. if( HAVE_OPENPTY )
  499. set( LIB_UTIL util )
  500. endif( )
  501. # restore CMAKE_REQUIRED_LIBRARIES
  502. set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
  503. unset( bak_CMAKE_REQUIRED_LIBRARIES )
  504. #### set tdesu backend ##########################
  505. if( WITH_SUDO_TDESU_BACKEND )
  506. set( DEFAULT_SUPER_USER_COMMAND sudo CACHE INTERNAL "" FORCE )
  507. else()
  508. set( DEFAULT_SUPER_USER_COMMAND su CACHE INTERNAL "" FORCE )
  509. endif()
  510. find_file( TDESU_BACKEND ${DEFAULT_SUPER_USER_COMMAND} PATHS ENV PATH )
  511. if( TDESU_BACKEND-NOTFOUND )
  512. tde_message_fatal( "${DEFAULT_SUPER_USER_COMMAND} was chosen as tdesu backend, but was not found in path." )
  513. endif( TDESU_BACKEND-NOTFOUND )
  514. #### set some constants #########################
  515. if( NOT "${TDEDIR}" )
  516. if( DEFINED ENV{TDEDIR} )
  517. set( TDEDIR "$ENV{TDEDIR}" )
  518. else( )
  519. set( TDEDIR "${CMAKE_INSTALL_PREFIX}" )
  520. endif( )
  521. endif( )
  522. set( KDE_COMPILER_VERSION "${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}" )
  523. set( KDE_COMPILING_OS "${CMAKE_SYSTEM_NAME}" )
  524. set( LTDL_OBJDIR \".\" )
  525. set( KDELIBSUFF "${LIB_SUFFIX}" )
  526. set( kde_socklen_t socklen_t )
  527. if( WITH_TDEHWLIB )
  528. set( __TDE_HAVE_TDEHWLIB 1 )
  529. endif( WITH_TDEHWLIB )
  530. ##### check for libdl ###########################
  531. set( DL_LIBRARIES dl )
  532. check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL )
  533. if( NOT HAVE_LIBDL )
  534. unset( DL_LIBRARIES )
  535. check_function_exists( dlopen HAVE_DLOPEN )
  536. if( HAVE_DLOPEN )
  537. set( HAVE_LIBDL 1 )
  538. endif( HAVE_DLOPEN )
  539. endif( NOT HAVE_LIBDL )
  540. ##### check for magic ###########################
  541. set( MAGIC_LIBRARIES magic )
  542. check_library_exists( ${MAGIC_LIBRARIES} magic_load "" HAVE_LIBMAGIC )
  543. if( HAVE_LIBMAGIC )
  544. check_library_exists( ${MAGIC_LIBRARIES} magic_getpath "" HAVE_LIBMAGIC_GETPATH )
  545. if( NOT HAVE_LIBMAGIC_GETPATH )
  546. execute_process(
  547. COMMAND file --version
  548. OUTPUT_VARIABLE LIBMAGIC_VERSION
  549. ERROR_VARIABLE LIBMAGIC_VERSION
  550. )
  551. string(REGEX REPLACE ".*magic file from ([^ \n]*).*" "\\1" LIBMAGIC_PATH ${LIBMAGIC_VERSION} )
  552. message( STATUS "libmagick default path ${LIBMAGIC_PATH}" )
  553. endif( NOT HAVE_LIBMAGIC_GETPATH )
  554. else( HAVE_LIBMAGIC )
  555. tde_message_fatal( "libmagic is required, but not found on your system" )
  556. endif( HAVE_LIBMAGIC )
  557. ##### check for utempter ########################
  558. if( WITH_UTEMPTER )
  559. check_include_file( utempter.h HAVE_UTEMPTER_H )
  560. check_library_exists( utempter addToUtmp "" HAVE_ADDTOUTEMP )
  561. if( NOT DEFINED UTEMPTER_HELPER )
  562. message( STATUS "Looking for utempter helper" )
  563. find_program( UTEMPTER_HELPER utempter
  564. PATHS
  565. /usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}/utempter
  566. /usr/lib${LIB_SUFFIX}/utempter
  567. /usr/libexec/utempter
  568. /usr/libexec
  569. /usr/sbin
  570. /usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}/utempter
  571. /usr/local/lib${LIB_SUFFIX}/utempter
  572. /usr/local/libexec/utempter
  573. /usr/local/libexec
  574. /usr/local/sbin
  575. )
  576. if( UTEMPTER_HELPER )
  577. message( STATUS "Looking for utempter helper - found" )
  578. else( )
  579. message( STATUS "Looking for utempter helper - not found" )
  580. endif( )
  581. endif( )
  582. if( HAVE_UTEMPTER_H AND HAVE_ADDTOUTEMP AND UTEMPTER_HELPER )
  583. set( HAVE_UTEMPTER 1 )
  584. set( UTEMPTER_LIBRARY utempter )
  585. else( )
  586. message(FATAL_ERROR "\nutempter are requested, but not found on your system" )
  587. endif( )
  588. endif( )
  589. ##### check for zlib ############################
  590. find_package( ZLIB )
  591. if( NOT ZLIB_FOUND )
  592. message(FATAL_ERROR "\nzlib are required, but not found on your system" )
  593. endif( NOT ZLIB_FOUND )
  594. set( HAVE_LIBZ 1 )
  595. #### check for bzip2 ############################
  596. find_package( BZip2 )
  597. if( NOT BZIP2_FOUND )
  598. # FIXME I'm not sure if bzip2 are required; maybe is OPTIONal?
  599. message(FATAL_ERROR "\nbzip2 are required, but not found on your system" )
  600. endif( NOT BZIP2_FOUND )
  601. set( HAVE_BZIP2_SUPPORT 1 )
  602. if( BZIP2_NEED_PREFIX )
  603. set( NEED_BZ2_PREFIX 1 )
  604. endif( BZIP2_NEED_PREFIX )
  605. ##### check for lzma/xz #########################
  606. if( WITH_LZMA )
  607. pkg_search_module( LZMA liblzma )
  608. if( NOT LZMA_FOUND )
  609. find_path( LZMA_INCLUDE_DIR lzma.h )
  610. find_library( LZMA_LIBRARY lzma )
  611. if( LZMA_LIBRARY AND LZMA_INCLUDE_DIR )
  612. message( STATUS "Found LZMA: ${LZMA_LIBRARY}" )
  613. set( LZMA_FOUND 1 )
  614. set( LZMA_INCLUDE_DIRS ${LZMA_INCLUDE_DIR} )
  615. set( LZMA_LIBRARIES lzma )
  616. endif( LZMA_LIBRARY AND LZMA_INCLUDE_DIR )
  617. endif( NOT LZMA_FOUND )
  618. check_library_exists( lzma lzma_code "" LZMA_CODE_FOUND )
  619. if( NOT LZMA_FOUND OR NOT LZMA_CODE_FOUND )
  620. tde_message_fatal( "LZMA is requested, but not found on your system" )
  621. endif( NOT LZMA_FOUND OR NOT LZMA_CODE_FOUND )
  622. set( HAVE_XZ_SUPPORT 1 )
  623. endif( WITH_LZMA )
  624. ##### check for pcsc ############################
  625. if( WITH_PCSC )
  626. find_path( PCSCLITE_INCLUDE_DIR pcsclite.h
  627. HINTS /usr/include/PCSC )
  628. find_library( PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC )
  629. if( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR )
  630. message( STATUS "Found PCSCLITE: ${PCSCLITE_LIBRARY}" )
  631. set( PCSCLITE_FOUND 1 )
  632. set( PCSCLITE_INCLUDE_DIRS ${PCSCLITE_INCLUDE_DIR} )
  633. set( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} )
  634. endif( PCSCLITE_LIBRARY AND PCSCLITE_INCLUDE_DIR )
  635. if( NOT PCSCLITE_FOUND )
  636. tde_message_fatal( "PCSCLITE is requested, but not found on your system" )
  637. endif( NOT PCSCLITE_FOUND )
  638. set( HAVE_PCSC_SUPPORT 1 )
  639. endif( WITH_PCSC )
  640. ##### check for pkcs ############################
  641. if( WITH_PKCS )
  642. pkg_search_module( LIBPKCS11-HELPER libpkcs11-helper-1 )
  643. if( NOT LIBPKCS11-HELPER_FOUND )
  644. message(FATAL_ERROR "\nPKCS support was requested, but libpkcs11-helper-1 was not found on your system" )
  645. endif( NOT LIBPKCS11-HELPER_FOUND )
  646. find_library( OPENSC_PKCS11_PROVIDER_LIBRARY NAMES opensc-pkcs11.so )
  647. if( OPENSC_PKCS11_PROVIDER_LIBRARY )
  648. set( OPENSC_PKCS11_PROVIDER_FOUND 1 )
  649. message( STATUS "Found OpenSC PKCS11 provider: ${OPENSC_PKCS11_PROVIDER_LIBRARY}" )
  650. endif( OPENSC_PKCS11_PROVIDER_LIBRARY )
  651. if( NOT OPENSC_PKCS11_PROVIDER_FOUND )
  652. tde_message_fatal( "PKCS is requested, but no OpenSC PKCS11 provider was found on your system" )
  653. endif( NOT OPENSC_PKCS11_PROVIDER_FOUND )
  654. pkg_search_module( SSL openssl )
  655. if( SSL_FOUND )
  656. set( HAVE_PKCS 1 )
  657. endif( )
  658. endif( )
  659. ##### check for pkcs ############################
  660. if( WITH_CRYPTSETUP )
  661. pkg_search_module( LIBCRYPTSETUP libcryptsetup )
  662. if( NOT LIBCRYPTSETUP_FOUND )
  663. find_library( LIBCRYPTSETUP_LIBRARY cryptsetup )
  664. if( NOT LIBCRYPTSETUP_LIBRARY )
  665. message(FATAL_ERROR "\ncryptsetup support was requested, but libcryptsetup was not found on your system" )
  666. endif ( NOT LIBCRYPTSETUP_LIBRARY )
  667. set( LIBCRYPTSETUP_LIBRARIES ${LIBCRYPTSETUP_LIBRARY} )
  668. endif( NOT LIBCRYPTSETUP_FOUND )
  669. set( HAVE_CRYPTSETUP 1 )
  670. if ( HAVE_CRYPTSETUP )
  671. # save CMAKE_REQUIRED_LIBRARIES
  672. set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
  673. set( CMAKE_REQUIRED_LIBRARIES ${LIBCRYPTSETUP_LIBRARIES} )
  674. check_c_source_compiles("
  675. #include <stddef.h>
  676. #include <libcryptsetup.h>
  677. int main(int argc, char *argv[]) { crypt_keyslot_info status = CRYPT_SLOT_ACTIVE; return 0; } "
  678. HAVE_NEW_CRYPTSETUP )
  679. check_c_source_compiles("
  680. #include <stddef.h>
  681. #include <libcryptsetup.h>
  682. int main(int argc, char *argv[]) { crypt_get_type(NULL); return 0; } "
  683. HAVE_CRYPTSETUP_GET_TYPE )
  684. # restore CMAKE_REQUIRED_LIBRARIES
  685. set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
  686. unset( bak_CMAKE_REQUIRED_LIBRARIES )
  687. endif( )
  688. if ( NOT HAVE_NEW_CRYPTSETUP )
  689. set( CRYPTSETUP_OLD_API 1 )
  690. endif( )
  691. endif( )
  692. ##### check for jpeg ############################
  693. find_package( JPEG )
  694. if( NOT JPEG_FOUND )
  695. # FIXME I think jpeg support must be required
  696. message(FATAL_ERROR "\njpeg are required, but not found on your system" )
  697. endif( NOT JPEG_FOUND )
  698. set( HAVE_LIBJPEG 1 )
  699. ##### check for png #############################
  700. find_package( PNG )
  701. if( NOT PNG_FOUND )
  702. # FIXME I think png support must be required
  703. message(FATAL_ERROR "\npng are required, but not found on your system" )
  704. endif( NOT PNG_FOUND )
  705. set( HAVE_LIBPNG 1 )
  706. ##### check for tiff ############################
  707. if( WITH_TIFF )
  708. find_package( TIFF )
  709. if( NOT TIFF_FOUND )
  710. message(FATAL_ERROR "\ntiff are requested, but not found on your system" )
  711. endif( NOT TIFF_FOUND )
  712. set( HAVE_LIBTIFF 1)
  713. endif( WITH_TIFF )
  714. ##### check for jasper ##########################
  715. if( WITH_JASPER )
  716. find_package( Jasper )
  717. if( NOT JASPER_FOUND )
  718. message(FATAL_ERROR "\njasper are requested, but not found on your system" )
  719. endif( NOT JASPER_FOUND )
  720. set( HAVE_JASPER 1 )
  721. endif( WITH_JASPER )
  722. ##### check for openexr #########################
  723. if( WITH_OPENEXR )
  724. pkg_search_module( OPENEXR OpenEXR )
  725. if( NOT OPENEXR_FOUND )
  726. message(FATAL_ERROR "\nopenexr are requested, but not found on your system" )
  727. endif( NOT OPENEXR_FOUND )
  728. set( HAVE_EXR 1 )
  729. endif( WITH_OPENEXR )
  730. ##### check for freetype2 #######################
  731. pkg_search_module( FREETYPE freetype2 )
  732. if( NOT FREETYPE_FOUND )
  733. message(FATAL_ERROR "\nfreetype2 are required, but not found on your system" )
  734. endif( NOT FREETYPE_FOUND )
  735. set( TDEINIT_USE_FONTCONFIG 1 )
  736. ##### check for fontconfig ######################
  737. pkg_search_module( FONTCONFIG fontconfig )
  738. if( NOT FONTCONFIG_FOUND )
  739. message(FATAL_ERROR "\nfontconfig are required, but not found on your system" )
  740. endif( NOT FONTCONFIG_FOUND )
  741. ##### check for Xrandr ##########################
  742. if( WITH_XRANDR )
  743. pkg_search_module( XRANDR xrandr>=1.2 )
  744. if( XRANDR_FOUND )
  745. set( XRANDR_SUPPORT 1 )
  746. else( XRANDR_FOUND )
  747. tde_message_fatal( "xrandr support was required, but not found on your system" )
  748. endif( XRANDR_FOUND )
  749. endif( WITH_XRANDR )
  750. ##### check for xrender #########################
  751. pkg_search_module( XRENDER xrender )
  752. if( XRENDER_FOUND )
  753. set( HAVE_XRENDER 1 )
  754. list( APPEND TDECORE_LIBRARY_DIRS ${XRENDER_LIBRARY_DIRS} )
  755. else( XRENDER_FOUND)
  756. message(FATAL_ERROR "\nxrender support is required, but not found on your system" )
  757. endif( XRENDER_FOUND )
  758. ##### check for xcomposite #########################
  759. if( WITH_XCOMPOSITE )
  760. pkg_search_module( XCOMPOSITE xcomposite )
  761. if( XCOMPOSITE_FOUND )
  762. set( HAVE_XCOMPOSITE 1 )
  763. else( WITH_XCOMPOSITE )
  764. tde_message_fatal( "xcomposite support was requested, but xcomposite was not found on your system" )
  765. endif( XCOMPOSITE_FOUND )
  766. endif( WITH_XCOMPOSITE )
  767. ##### check for mit-shm extension ##################
  768. if( WITH_MITSHM )
  769. tde_save_and_set( CMAKE_REQUIRED_FLAGS "-include X11/Xlib.h" )
  770. check_include_file( "X11/extensions/XShm.h" HAVE_MITSHM )
  771. tde_restore( CMAKE_REQUIRED_FLAGS )
  772. if( NOT HAVE_MITSHM )
  773. tde_message_fatal( "XShm extension is required, but was not found on your system" )
  774. endif( NOT HAVE_MITSHM )
  775. endif( WITH_MITSHM )
  776. ##### check for xext ###############################
  777. if( HAVE_XRENDER OR WITH_XCOMPOSITE OR WITH_XRANDR OR HAVE_X11_EXTENSIONS_SHAPE_H OR WITH_MITSHM )
  778. # xext (tdecore, tdeui, tderandr, tdestyles/keramik)
  779. pkg_search_module( XEXT xext )
  780. if( NOT XEXT_FOUND )
  781. tde_message_fatal( "xext is required, but was not found on your system" )
  782. endif( )
  783. endif( HAVE_XRENDER OR WITH_XCOMPOSITE OR WITH_XRANDR OR HAVE_X11_EXTENSIONS_SHAPE_H OR WITH_MITSHM )
  784. ##### check for libxml-2.0 ######################
  785. pkg_search_module( LIBXML2 libxml-2.0 )
  786. if( NOT LIBXML2_FOUND )
  787. message(FATAL_ERROR "\nlibxml-2.0 are required, but not found on your system" )
  788. endif( NOT LIBXML2_FOUND )
  789. ##### check for libxslt ######################
  790. pkg_search_module( LIBXSLT libxslt )
  791. if( NOT LIBXSLT_FOUND )
  792. message(FATAL_ERROR "\nlibxslt are required, but not found on your system" )
  793. endif( NOT LIBXSLT_FOUND )
  794. ##### check for glib-2.0 & friends ##############
  795. pkg_search_module( GLIB2 glib-2.0 )
  796. if( NOT GLIB2_FOUND )
  797. tde_message_fatal( "glib-2.0 are required, but not found on your system" )
  798. endif( )
  799. pkg_search_module( GOBJECT2 gobject-2.0 )
  800. if( NOT GLIB2_FOUND )
  801. tde_message_fatal( "gobject-2.0 are required, but not found on your system" )
  802. endif( )
  803. ##### check for ALSA ############################
  804. # FIXME I propose to drop support for very old ALSA versions (i.e 0.5)
  805. if( WITH_ALSA )
  806. find_package( ALSA )
  807. if( NOT ALSA_FOUND )
  808. message(FATAL_ERROR "\nALSA support are requested, but not found on your system" )
  809. endif( NOT ALSA_FOUND )
  810. set( HAVE_LIBASOUND2 1 )
  811. # FIXME I'm not sure if order is correct
  812. check_include_file( "alsa/asoundlib.h" HAVE_ALSA_ASOUNDLIB_H )
  813. if( NOT HAVE_ALSA_ASOUNDLIB_H )
  814. check_include_file( "sys/asoundlib.h" HAVE_SYS_ASOUNDLIB_H )
  815. endif( NOT HAVE_ALSA_ASOUNDLIB_H )
  816. endif( WITH_ALSA )
  817. ##### check for aRts ############################
  818. if( WITH_ARTS )
  819. pkg_search_module( ARTS arts )
  820. if( ARTS_FOUND )
  821. set( ARTS_MCOPIDL_EXECUTABLE ${ARTS_PREFIX}/bin/mcopidl )
  822. else( ARTS_FOUND )
  823. message(FATAL_ERROR "\naRts are requested, but not found on your system" )
  824. endif( ARTS_FOUND )
  825. else( WITH_ARTS )
  826. set( WITHOUT_ARTS 1 )
  827. endif( WITH_ARTS )
  828. ##### check for Xft #############################
  829. string( REGEX REPLACE ".*;([^;]*qt-mt);.*" "\\1" TQT_MT ";${TQT_LIBRARIES};" )
  830. if( TQT_MT )
  831. pkg_search_module( TQT_MT ${TQT_MT} )
  832. tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${TQT_MT_LIBRARIES}" )
  833. check_library_exists( tqt-mt XftInit "" TDEINIT_USE_XFT )
  834. tde_restore( CMAKE_REQUIRED_LIBRARIES )
  835. endif( TQT_MT )
  836. if( TDEINIT_USE_XFT )
  837. pkg_search_module( XFT xft )
  838. if( NOT XFT_FOUND )
  839. tde_message_fatal( "Xft is required, but not found on your system" )
  840. endif( NOT XFT_FOUND )
  841. endif( TDEINIT_USE_XFT )
  842. ##### check for libart ##########################
  843. if( WITH_LIBART )
  844. pkg_search_module( LIBART libart-2.0 )
  845. if( NOT LIBART_FOUND )
  846. message(FATAL_ERROR "\nlibart-2.0 support are requested, but not found on your system" )
  847. endif( NOT LIBART_FOUND )
  848. set( HAVE_LIBART 1 )
  849. list( APPEND TDECORE_LIBRARY_DIRS ${LIBART_LIBRARY_DIRS} )
  850. endif( WITH_LIBART )
  851. ##### check for libidn ##########################
  852. if( WITH_LIBIDN )
  853. pkg_search_module( LIBIDN libidn )
  854. if( NOT LIBIDN_FOUND )
  855. message(FATAL_ERROR "\nlibidn support are requested, but not found on your system" )
  856. endif( NOT LIBIDN_FOUND )
  857. set( HAVE_LIBIDN 1 )
  858. check_include_file( "idna.h" HAVE_IDNA_H )
  859. check_include_file( "punycode.h" HAVE_PUNYCODE_H )
  860. check_include_file( "stringprep.h" HAVE_STRINGPREP_H )
  861. list( APPEND TDECORE_LIBRARY_DIRS ${LIBIDN_LIBRARY_DIRS} )
  862. endif( WITH_LIBIDN )
  863. ##### check for libbfq ##########################
  864. if( WITH_LIBBFD )
  865. check_library_exists( bfd bfd_init "" HAVE_LIBBFD )
  866. if( NOT HAVE_LIBBFD )
  867. tde_message_fatal( "libbfd support is requested, but not found on your system" )
  868. endif( NOT HAVE_LIBBFD )
  869. set( LIBBFD_LIBRARIES bfd )
  870. check_include_file( "demangle.h" HAVE_DEMANGLE_H )
  871. endif( WITH_LIBBFD )
  872. ##### check for openssl #########################
  873. if( WITH_SSL )
  874. pkg_search_module( SSL openssl )
  875. if( NOT SSL_FOUND )
  876. check_include_file( openssl/ssl.h HAVE_OPENSSL_H )
  877. check_library_exists( ssl OPENSSL_init_ssl "" HAVE_LIBSSL_11 )
  878. if( NOT HAVE_LIBSSL_11 )
  879. check_library_exists( ssl SSL_library_init "" HAVE_LIBSSL )
  880. endif( )
  881. check_library_exists( crypto EVP_EncryptInit_ex "" HAVE_LIBCRYPTO )
  882. if( HAVE_OPENSSL_H AND (HAVE_LIBSSL_11 OR HAVE_LIBSSL) AND HAVE_LIBCRYPTO )
  883. set( SSL_FOUND 1 CACHE INTERNAL "" FORCE )
  884. find_file( OPENSSLV_H openssl/opensslv.h )
  885. file( STRINGS "${OPENSSLV_H}" SSL_VERSION REGEX "#[ \t]*define[ \t]*OPENSSL_VERSION_TEXT" )
  886. string( REGEX REPLACE "# *define[ \t]*OPENSSL_VERSION_TEXT[ \t]*\"[^0-9 ]* *([^ ]*).*" "\\1"
  887. SSL_VERSION "${SSL_VERSION}" )
  888. set( SSL_VERSION "${SSL_VERSION}" CACHE INTERNAL "" FORCE )
  889. message( STATUS "Found OpenSSL: version ${SSL_VERSION}" )
  890. endif( HAVE_OPENSSL_H AND (HAVE_LIBSSL_11 OR HAVE_LIBSSL) AND HAVE_LIBCRYPTO )
  891. endif( NOT SSL_FOUND )
  892. if( NOT SSL_FOUND )
  893. tde_message_fatal( "SSL support is requested, but openssl not found on your system" )
  894. endif( NOT SSL_FOUND )
  895. set( KSSL_HAVE_SSL 1 )
  896. set( HAVE_SSL 1 )
  897. endif( WITH_SSL )
  898. ##### check for cups ############################
  899. # FIXME CUPS must be at least 1.1.9
  900. if( WITH_CUPS )
  901. find_package( Cups )
  902. if( NOT CUPS_FOUND )
  903. message(FATAL_ERROR "\nCUPS support are requested, but not found on your system" )
  904. endif( NOT CUPS_FOUND )
  905. set( HAVE_CUPS 1 )
  906. # FIXME if CUPS is at least 1.1.20, doesn't have password caching
  907. set( HAVE_CUPS_NO_PWD_CACHE 1 )
  908. # save CMAKE_REQUIRED_LIBRARIES
  909. set( bak_CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
  910. set( CMAKE_REQUIRED_LIBRARIES ${CUPS_LIBRARIES} )
  911. check_c_source_compiles("
  912. #include <cups/cups.h>
  913. #include <cups/ipp.h>
  914. #include <cups/language.h>
  915. int main(int argc, char *argv[]) { ipp_attribute_t *attr = 0; ippGetName(attr); return 0; } "
  916. HAVE_CUPS_1_6 )
  917. # restore CMAKE_REQUIRED_LIBRARIES
  918. set( CMAKE_REQUIRED_LIBRARIES ${bak_CMAKE_REQUIRED_LIBRARIES} )
  919. unset( bak_CMAKE_REQUIRED_LIBRARIES )
  920. endif( WITH_CUPS )
  921. ##### check for LUA #############################
  922. if( WITH_LUA )
  923. message(FATAL_ERROR "\nLUA support are not ready yet" )
  924. pkg_search_module( LUA lua )
  925. if( NOT LUA_FOUND )
  926. message(FATAL_ERROR "\nLUA support are requested, but not found on your system" )
  927. endif( NOT LUA_FOUND )
  928. set( HAVE_LUA 1 )
  929. endif( WITH_LUA )
  930. ##### check for avahi ###########################
  931. if( WITH_AVAHI )
  932. pkg_search_module( AVAHI_TQT avahi-tqt )
  933. pkg_search_module( AVAHI_CLIENT avahi-client )
  934. if( NOT AVAHI_TQT_FOUND OR NOT AVAHI_CLIENT_FOUND )
  935. tde_message_fatal( "avahi support is requested, but not found on your system" )
  936. endif( NOT AVAHI_TQT_FOUND OR NOT AVAHI_CLIENT_FOUND )
  937. if( NOT AVAHI_CLIENT_VERSION VERSION_LESS "0.6" )
  938. set( AVAHI_API_0_6 1 )
  939. endif( )
  940. set( HAVE_DNSSD 1 )
  941. endif( )
  942. ##### check for libr ###########################
  943. # WARNING
  944. # before altering the LIBR_VERSION check,
  945. # please ensure that nothing changed in the
  946. # duplicated data definitions present in
  947. # tdeio/tdeio/tdefileitem.cpp
  948. if( WITH_ELFICON )
  949. pkg_search_module( LIBR libr )
  950. if( NOT LIBR_FOUND )
  951. message(FATAL_ERROR "\nelficon support was requested, but libr was not found on your system" )
  952. endif( NOT LIBR_FOUND )
  953. if( NOT "${LIBR_VERSION}" STREQUAL "0.6.0" )
  954. message(FATAL_ERROR "\nelficon support was requested, but the libr version on your system may not be compatible with TDE" )
  955. endif( NOT "${LIBR_VERSION}" STREQUAL "0.6.0" )
  956. set( HAVE_ELFICON 1 )
  957. endif( )
  958. ##### check for pcre ###########################
  959. if( WITH_PCRE )
  960. pkg_search_module( LIBPCRE libpcre )
  961. if( NOT LIBPCRE_FOUND )
  962. message(FATAL_ERROR "\npcre support are requested, but not found on your system" )
  963. endif( NOT LIBPCRE_FOUND )
  964. set( HAVE_PCREPOSIX 1 )
  965. endif( )
  966. ##### check for dbus and set files location #####
  967. tde_setup_dbus( dbus-1-tqt )
  968. list( APPEND TDECORE_LIBRARY_DIRS ${DBUS_TQT_LIBRARY_DIRS} )
  969. ##### Add '[KDE4]' to KDE4 menu items #########
  970. if( WITH_KDE4_MENU_SUFFIX )
  971. set( KDE4_MENU_SUFFIX 1 )
  972. endif ( WITH_KDE4_MENU_SUFFIX )
  973. ##### check for gcc visibility support #########
  974. if( WITH_GCC_VISIBILITY )
  975. tde_setup_gcc_visibility( )
  976. endif( )
  977. ##### check for inotify ###########################
  978. if( WITH_INOTIFY )
  979. check_include_file( "inotify.h" INOTIFY_FOUND )
  980. check_include_file( "sys/inotify.h" INOTIFY_SYS_FOUND )
  981. if( NOT INOTIFY_FOUND )
  982. if( NOT INOTIFY_SYS_FOUND )
  983. message(FATAL_ERROR "\ninotify support was requested, but inotify was not found on your system" )
  984. endif( NOT INOTIFY_SYS_FOUND )
  985. endif( NOT INOTIFY_FOUND )
  986. if( INOTIFY_FOUND )
  987. set( HAVE_INOTIFY 1 )
  988. endif( INOTIFY_FOUND )
  989. if( INOTIFY_SYS_FOUND )
  990. set( HAVE_INOTIFY 1 )
  991. set( HAVE_SYS_INOTIFY 1 )
  992. endif( INOTIFY_SYS_FOUND )
  993. endif( )
  994. ##### check for FAM/GAMIN ##########################
  995. if( WITH_GAMIN )
  996. check_include_file( "fam.h" HAVE_FAM_H )
  997. if( HAVE_FAM_H )
  998. pkg_search_module( GAMIN gamin )
  999. if( GAMIN_FOUND )
  1000. set( HAVE_FAM 1 )
  1001. list( APPEND TDECORE_LIBRARY_DIRS ${GAMIN_LIBRARY_DIRS} )
  1002. else( GAMIN_FOUND )
  1003. message(FATAL_ERROR "\nfam/gamin support was requested, but gamin was not found on your system" )
  1004. endif( GAMIN_FOUND )
  1005. else( HAVE_FAM_H )
  1006. message(FATAL_ERROR "\nfam/gamin support was requested, but fam was not found on your system" )
  1007. endif( HAVE_FAM_H )
  1008. endif( WITH_GAMIN )
  1009. ##### check for ispell ##########################
  1010. if( WITH_ISPELL )
  1011. if( NOT ISPELL_LIBDIR )
  1012. find_program( ISPELL_EXECUTABLE NAMES ispell DOC "path to the ispell executable" )
  1013. if( ISPELL_EXECUTABLE )
  1014. execute_process (
  1015. COMMAND ${ISPELL_EXECUTABLE} -vv
  1016. COMMAND awk "$1 == \"LIBDIR\" && $2 == \"=\" {gsub(/\"/, \"\", $3); print $3;}"
  1017. OUTPUT_VARIABLE ISPELL_LIBDIR
  1018. OUTPUT_STRIP_TRAILING_WHITESPACE)
  1019. if ( ISPELL_LIBDIR )
  1020. set ( ISPELL_LIBDIR "${ISPELL_LIBDIR}" CACHE PATH "ispell lib directory contains dictionaries" )
  1021. else ( ISPELL_LIBDIR )
  1022. unset ( ISPELL_LIBDIR )
  1023. endif ( ISPELL_LIBDIR )
  1024. endif( ISPELL_EXECUTABLE )
  1025. endif ( NOT ISPELL_LIBDIR )
  1026. endif( WITH_ISPELL )
  1027. ##### check for aspell ##########################
  1028. if( WITH_ASPELL )
  1029. find_package( ASPELL )
  1030. if( NOT ASPELL_FOUND )
  1031. message(FATAL_ERROR "\nASPELL support are requested, but not found on your system" )
  1032. endif( NOT ASPELL_FOUND )
  1033. if( NOT ASPELL_DATADIR )
  1034. find_program( PSPELL_CONFIG_EXECUTABLE NAMES pspell-config DOC "path to the pspell-config executable" )
  1035. if( PSPELL_CONFIG_EXECUTABLE )
  1036. execute_process (
  1037. COMMAND ${PSPELL_CONFIG_EXECUTABLE} --pkgdatadir
  1038. OUTPUT_VARIABLE ASPELL_DATADIR
  1039. OUTPUT_STRIP_TRAILING_WHITESPACE)
  1040. endif( PSPELL_CONFIG_EXECUTABLE )
  1041. endif( NOT ASPELL_DATADIR )
  1042. endif( WITH_ASPELL )
  1043. if( NOT ASPELL_DATADIR )
  1044. set ( ASPELL_DATADIR "/usr/lib/aspell" )
  1045. endif( NOT ASPELL_DATADIR )
  1046. set ( ASPELL_DATADIR "${ASPELL_DATADIR}" CACHE PATH "aspell data directory" )
  1047. ##### check for hspell ##########################
  1048. if( WITH_HSPELL )
  1049. find_package( HSPELL )
  1050. if( NOT HSPELL_FOUND )
  1051. message(FATAL_ERROR "\nHSPELL support are requested, but not found on your system" )
  1052. endif( NOT HSPELL_FOUND )
  1053. endif( WITH_HSPELL )
  1054. ####" default spell checker #####################
  1055. set( DEFAULT_SPELL_CHECKER "ISPELL" CACHE STRING "default spell checker" )
  1056. if( NOT WITH_${DEFAULT_SPELL_CHECKER} )
  1057. tde_message_fatal( "Spell checker selected as default (${DEFAULT_SPELL_CHECKER}) is not enabled to build." )
  1058. endif()
  1059. ##### enable TDEIconLoader debugging ############
  1060. if ( WITH_TDEICONLOADER_DEBUG )
  1061. set ( TDEICONLOADER_DEBUG 1 )
  1062. endif ( WITH_TDEICONLOADER_DEBUG )
  1063. ##### find tools path ###########################
  1064. if( NOT WIN32 AND NOT ICEAUTH_PATH )
  1065. find_program( ICEAUTH_PATH iceauth )
  1066. if( ${ICEAUTH_PATH} STREQUAL "ICEAUTH_PATH-NOTFOUND" )
  1067. tde_message_fatal( "iceauth command was not found in path." )
  1068. endif()
  1069. message( STATUS "Found iceauth: ${ICEAUTH_PATH}" )
  1070. endif( NOT WIN32 AND NOT ICEAUTH_PATH )
  1071. ##### find the rgb.txt file
  1072. message( STATUS "Looking for rgb.txt" )
  1073. find_file( PATH_RGB rgb.txt
  1074. PATHS
  1075. /usr/share/X11
  1076. /usr/X11R6/lib/X11
  1077. /usr/openwin/lib/X11
  1078. )
  1079. if( PATH_RGB )
  1080. message( STATUS "Found rgb.txt file: ${PATH_RGB}" )
  1081. set( X11_RGBFILE "${PATH_RGB}" )
  1082. endif()
  1083. ##### Look for xmllint
  1084. find_program( XMLLINT_EXE xmllint )
  1085. if( XMLLINT_EXE )
  1086. set( XMLLINT "${XMLLINT_EXE}" )
  1087. message( STATUS "Found xmllint: ${XMLLINT}" )
  1088. endif()
  1089. ##### write configure files #####################
  1090. configure_file( config.h.cmake config.h )
  1091. configure_file( tdecore/kdemacros.h.cmake tdecore/kdemacros.h )
  1092. configure_file( kjs/global.h.in kjs/global.h )
  1093. configure_file( tdeio/kssl/ksslconfig.h.cmake tdeio/kssl/ksslconfig.h )
  1094. configure_file( kdoctools/checkXML.cmake kdoctools/checkXML )
  1095. ##### tools #####################################
  1096. set( KDE3_DCOPIDL_EXECUTABLE dcopidl )
  1097. set( KDE3_DCOPIDLNG_EXECUTABLE
  1098. perl -I"${CMAKE_SOURCE_DIR}/dcop/dcopidlng"
  1099. "${CMAKE_SOURCE_DIR}/dcop/dcopidlng/kalyptus"
  1100. --allow_k_dcop_accessors -f dcopidl
  1101. )
  1102. set( KDE3_DCOPIDL2CPP_EXECUTABLE dcopidl2cpp )
  1103. set( KDE3_MEINPROC_EXECUTABLE meinproc )
  1104. set( KDE3_KCFGC_EXECUTABLE tdeconfig_compiler )
  1105. ##### global compiler settings ##################
  1106. add_definitions(
  1107. -DHAVE_CONFIG_H
  1108. )
  1109. set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
  1110. set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
  1111. set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
  1112. ##### headers ###################################
  1113. install( FILES
  1114. tde.pot
  1115. DESTINATION ${INCLUDE_INSTALL_DIR} )
  1116. ##### pkg-config #################################
  1117. execute_process(
  1118. COMMAND awk "/^#define TDE_VERSION_MAJOR/,/^#define TDE_VERSION_RELEASE/{ v[++i]=$3 }; END { print v[1]\".\"v[2]\".\"v[3] };"
  1119. INPUT_FILE ${CMAKE_SOURCE_DIR}/tdecore/tdeversion.h
  1120. OUTPUT_VARIABLE TDE_RELEASE_NUM
  1121. OUTPUT_STRIP_TRAILING_WHITESPACE )
  1122. configure_file( tdelibs.pc.cmake tdelibs.pc @ONLY )
  1123. install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdelibs.pc DESTINATION ${PKGCONFIG_INSTALL_DIR} )
  1124. ##### read source metadata ######################
  1125. set( TDE_VERSION "${TDE_RELEASE_NUM}" )
  1126. tde_read_src_metadata()
  1127. ##### subdirectories ############################
  1128. if( WITH_ELFICON )
  1129. add_subdirectory( tdelfeditor )
  1130. endif( WITH_ELFICON )
  1131. add_subdirectory( dcop )
  1132. add_subdirectory( libltdl )
  1133. add_subdirectory( kglib )
  1134. add_subdirectory( tdefx )
  1135. add_subdirectory( tdecore )
  1136. add_subdirectory( tdeunittest )
  1137. add_subdirectory( tdeui )
  1138. add_subdirectory( tdesu )
  1139. add_subdirectory( kjs )
  1140. add_subdirectory( tdewallet )
  1141. add_subdirectory( tdeio )
  1142. add_subdirectory( kded )
  1143. # FIXME this directory/target doesn't exists
  1144. # add_subdirectory( kded_post )
  1145. add_subdirectory( kdoctools )
  1146. add_subdirectory( doc )
  1147. add_subdirectory( tdeparts )
  1148. add_subdirectory( tdeutils )
  1149. add_subdirectory( tdespell2 )
  1150. add_subdirectory( tdemdi )
  1151. add_subdirectory( tdeinit )
  1152. add_subdirectory( tdeprint )
  1153. add_subdirectory( kab )
  1154. add_subdirectory( tderesources )
  1155. add_subdirectory( tdeabc )
  1156. add_subdirectory( arts )
  1157. add_subdirectory( interfaces )
  1158. add_subdirectory( kate )
  1159. add_subdirectory( tdecert )
  1160. tde_conditional_add_subdirectory( WITH_XRANDR tderandr )
  1161. add_subdirectory( tdehtml )
  1162. add_subdirectory( tdecmshell )
  1163. add_subdirectory( tdeconf_update )
  1164. add_subdirectory( tdewidgets )
  1165. add_subdirectory( kimgio )
  1166. add_subdirectory( tdeioslave )
  1167. add_subdirectory( tdestyles )
  1168. add_subdirectory( libtdemid )
  1169. add_subdirectory( libtdescreensaver )
  1170. add_subdirectory( networkstatus )
  1171. add_subdirectory( tdenewstuff )
  1172. add_subdirectory( tdersync )
  1173. add_subdirectory( licenses )
  1174. add_subdirectory( dnssd )
  1175. add_subdirectory( pics )
  1176. add_subdirectory( mimetypes )
  1177. add_subdirectory( tdefile-plugins )
  1178. ##### install import cmake modules ###############
  1179. tde_install_export( )