summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
blob: 1864512fd413104e3c0fbfe195273e0189ac67fc (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
###########################################
#                                         #
#  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( )


##### check for gcc visibility support

if( WITH_GCC_VISIBILITY )
  tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY )


##### check for lcms

if( WITH_LCMS )
    check_include_file( lcms2.h HAVE_LCMS2_H )
    if( HAVE_LCMS2_H )
        pkg_search_module( LCMS lcms2 )
        set( LCMS_HEADER lcms2.h )
     else()
        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 requested, but was not found on your system" )
        endif()
    endif()
    set( USE_LCMS 1 )
endif( WITH_LCMS )


##### check for OpenMP

if( WITH_OPENMP )
    find_package( OpenMP )
    if( OPENMP_FOUND )
        set( CMAKE_C_FLAGS   "${CMAKE_C_FLAGS}   ${OpenMP_C_FLAGS}"   )
        set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}" )
     else()
        tde_message_fatal( "OpenMP is requested, but was not found on your system" )
    endif()
endif( WITH_OPENMP )


##### check for jpeg

if( BUILD_KDCRAW )
    find_package( JPEG )

    if( JPEG_FOUND )
        set( HAVE_JPEG 1 )
     else()
        tde_message_fatal( "jpeg library is required, but was not found on your system" )
    endif()

##### check for the math libc

    find_library( MATH_LIBC m )

endif( BUILD_KDCRAW )