1) Clean up: Consolidate Views and MixDeviceWidgets, so that there is
[kdemultimedia.git] / ConfigureChecks.cmake
blobc732f8d0f0f82b26454c606aa19fbcca6574dc68
1 include(CheckIncludeFiles)
2 include(CheckSymbolExists)
3 include(CheckFunctionExists)
4 include(CheckLibraryExists)
5 include(CheckPrototypeExists)
6 include(CheckTypeSize)
7 include(MacroBoolTo01)
9 # The FindKDE4.cmake module sets _KDE4_PLATFORM_DEFINITIONS with
10 # definitions like _GNU_SOURCE that are needed on each platform.
11 set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
13 macro_bool_to_01(CARBON_FOUND HAVE_CARBON)
15 macro_bool_to_01(AKODE_FOUND HAVE_AKODE)
17 macro_bool_to_01(THEORA_FOUND HAVE_LIBTHEORA)
19 macro_bool_to_01(TAGLIB_FOUND HAVE_TAGLIB)
21 macro_bool_to_01(OGGVORBIS_FOUND HAVE_VORBIS OGG_VORBIS HAVE_OGG_VORBIS)
23 macro_bool_to_01(FLAC_OGGFLAC_LIBRARIES HAVE_LIBOGGFLAC)
25 macro_bool_to_01(X11_XShm_FOUND  HAVE_XSHMGETEVENTBASE)
27 if(TUNEPIMP_FOUND)
28         set(HAVE_TUNEPIMP 1)
29         if( TUNEPIMP_FOUND_VERSION_4)
30                 set(HAVE_TUNEPIMP 4)
31         endif(TUNEPIMP_FOUND_VERSION_4) 
32        if( TUNEPIMP_FOUND_VERSION_5)
33                 set(HAVE_TUNEPIMP 5)
34         endif(TUNEPIMP_FOUND_VERSION_5)         
35 else(TUNEPIMP_FOUND)
36         set(HAVE_TUNEPIMP 0)
37 endif(TUNEPIMP_FOUND)   
39 #now check for dlfcn.h using the cmake supplied CHECK_include_FILE() macro
40 # If definitions like -D_GNU_SOURCE are needed for these checks they
41 # should be added to _KDE4_PLATFORM_DEFINITIONS when it is originally
42 # defined outside this file.  Here we include these definitions in
43 # CMAKE_REQUIRED_DEFINITIONS so they will be included in the build of
44 # checks below.
45 set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS})
46 if (WIN32)
47    set(CMAKE_REQUIRED_LIBRARIES ${KDEWIN32_LIBRARIES} )
48    set(CMAKE_REQUIRED_INCLUDES  ${KDEWIN32_INCLUDES} )
49 endif (WIN32)
51 check_include_files(machine/soundcard.h HAVE_MACHINE_SOUNDCARD_H)
52 check_include_files(soundcard.h HAVE_SOUNDCARD_H)
53 check_include_files(sys/soundcard.h HAVE_SYS_SOUNDCARD_H)
54 check_include_files(sys/stat.h HAVE_SYS_STAT_H)
55 check_include_files(linux/cdrom.h HAVE_LINUX_CDROM_H)
56 check_include_files(linux/ucdrom.h HAVE_LINUX_UCDROM_H)
57 check_include_files(machine/endian.h HAVE_MACHINE_ENDIAN_H)
58 check_include_files(sys/audioio.h HAVE_SYS_AUDIOIO_H)
59 check_include_files(Alib.h HAVE_ALIB_H)
60 check_include_files(alloca.h HAVE_ALLOCA_H)
62 check_type_size("long" SIZEOF_LONG)