summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
blob: 7a9c78a81dedb223dd1ca9a60e279ede7f10d2be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
###########################################
#                                         #
#  Improvements and feedback are welcome  #
#                                         #
#  This file is released under GPL >= 3   #
#                                         #
###########################################


# required stuff
find_package( TQt )
find_package( TDE )

tde_setup_architecture_flags( )

include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)

tde_setup_largefiles( )

set( ENV{PKG_CONFIG_PATH} "${PKG_CONFIG_PATH}:$ENV{PKG_CONFIG_PATH}:${LIB_INSTALL_DIR}/pkgconfig" )


##### check for gcc visibility support

if( WITH_GCC_VISIBILITY )
  tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )


##### check for pthread

find_package ( Threads REQUIRED )


##### check for OpenGL

pkg_search_module( GL gl )
if( NOT GL_FOUND )
  tde_message_fatal( "opengl is required but was not found on your system" )
endif( )


##### check for libkexif

if( WITH_KEXIF )
  pkg_search_module( KEXIF libkexif )
  if( NOT KEXIF_FOUND )
    tde_message_fatal( "libkexif was requested but not found on your system" )
  endif( )
  set ( SQ_HAVE_KEXIF 1 )
endif()


##### check for libkipi

if( WITH_KIPI )
  pkg_search_module( KIPI libkipi )
  if( NOT KIPI_FOUND )
    tde_message_fatal( "libkipi was requested but not found on your system" )
  endif( )
  set ( SQ_HAVE_KIPI 1 )
endif()


##### check for libksquirrel

pkg_search_module( KSQUIRREL ksquirrellibs )
if( NOT KSQUIRREL_FOUND )
  tde_message_fatal( "libksquirrel is required but not found on your system" )
endif( )


##### check specific architecture dependant support
if( CMAKE_SYSTEM_PROCESSOR MATCHES "i.86" )

  # MMX support
  cmake_host_system_information(RESULT HAVE_X86_MMX QUERY HAS_MMX)
  if(HAVE_X86_MMX)
    set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -DHAVE_X86_MMX")
  endif(HAVE_X86_MMX)

endif( )


##### check for required include files

check_include_file( "kregexpeditorinterface.h" SQ_HAVE_KREGEXP )
check_include_file( "utime.h" HAVE_UTIME_H )