summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
blob: 9fa91c17164ebca7d8892bf0620cf4041b8f1db4 (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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
###########################################
#                                         #
#  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( )

# Add Trinity location for pkg-config files
set( ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${PKGCONFIG_INSTALL_DIR}")


##### 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 system SQLite3

if( WITH_LOCAL_SQLITE3 )
  set( SQLITE3_INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/src/libs/sqlite3 )
  set( SQLITE3_LIBRARIES sqlite3-static )
else()
  pkg_search_module( SQLITE3 sqlite3 )
  if( NOT SQLITE3_FOUND )
    tde_message_fatal( "SQLite3 is required but not found on your system" )
  endif( )
endif()


##### check for lcms

check_include_file( lcms.h HAVE_LCMS_H )
if( HAVE_LCMS_H )
  pkg_search_module( LCMS lcms )
  set( LCMS_HEADER lcms.h )
else()
  tde_message_fatal( "lcms is requireq but was not found on your system" )
endif()


##### check for libexiv2

pkg_search_module( KEXIV2 libkexiv2 )
if( NOT KEXIV2_FOUND )
  tde_message_fatal( "libkexiv2 is required but was not found on your system" )
endif( NOT KEXIV2_FOUND )


##### check for libjpeg

find_package( JPEG )
if( NOT JPEG_FOUND )
  tde_message_fatal( "libjpeg is required but was not found on your system" )
endif()


##### checks for libpeg2000

find_package( Jasper )
if( NOT JASPER_FOUND )
  tde_message_fatal( "libjasper is required but not found on your system" )
endif( )


##### check for libkdcraw

pkg_search_module( KDCRAW libkdcraw )
if( NOT KDCRAW_FOUND )
  tde_message_fatal( "libkdcraw is required but not found on your system" )
endif( )


##### check for libkipi

pkg_search_module( KIPI libkipi )
if( NOT KIPI_FOUND )
  tde_message_fatal( "libkipi is requireq but not found on your system" )
endif( )


##### check for libgphoto2

pkg_search_module( GPHOTO2 libgphoto2 )
if( NOT GPHOTO2_FOUND )
  tde_message_fatal( "libgphoto2 is required but not found on your system" )
endif( )

check_library_exists(gphoto2_port gp_port_info_get_name "" GPHOTO2_5)
if( GPHOTO2_5 )
  message(STATUS "  found libgphoto2 2.5")
  set( HAVE_GPHOTO25 1 )
else( )
  message(STATUS "  assuming libgphoto2 2.4")
endif( )


##### check for libpng

find_package( PNG )
if( NOT PNG_FOUND )
  tde_message_fatal( "libpng is required but was not found on your system" )
endif()


##### checks for libtiff

find_package( TIFF )
if( NOT TIFF_FOUND )
  tde_message_fatal( "libtiff is required but not found on your system" )
endif( )