summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2022-06-18 22:59:25 +0900
committerMichele Calgaro <[email protected]>2022-07-10 17:21:43 +0900
commitbc7518bdba609f90ee89de8b4e7ddaa1e567b1a8 (patch)
tree7a3f446098bbdaafc799fc97dd1bb998a2456252 /ConfigureChecks.cmake
parentf3116341d095d1b0237f7a36d1f3511759da7b03 (diff)
downloadtderadio-bc7518bdba609f90ee89de8b4e7ddaa1e567b1a8.tar.gz
tderadio-bc7518bdba609f90ee89de8b4e7ddaa1e567b1a8.zip
CMake conversion.
Signed-off-by: Michele Calgaro <[email protected]> Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake94
1 files changed, 94 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..5a14d7f
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,94 @@
+###########################################
+# #
+# 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 ALSA #####
+
+if( BUILD_ALSA_PLUGIN )
+ find_package( ALSA )
+ if( NOT ALSA_FOUND )
+ tde_message_fatal( "alsa support is requested, but was not found on your system" )
+ endif( NOT ALSA_FOUND )
+endif( BUILD_ALSA_PLUGIN )
+
+
+###### check for LAME #####
+
+if( WITH_LAME )
+ check_include_file( lame/lame.h HAVE_LAME_H )
+ if( NOT HAVE_LAME_H )
+ tde_message_fatal( "lame is requested, but not found on your system" )
+ endif( )
+ check_library_exists( mp3lame lame_init "" HAVE_LAME )
+ if( NOT HAVE_LAME )
+ tde_message_fatal( "mp3lame is requested, but not found on your system" )
+ endif( )
+ set( HAVE_LAME 1 )
+ set( LAME_LIBRARIES mp3lame CACHE INTERNAL "" FORCE )
+endif( WITH_LAME )
+
+
+##### check for LIRC #####
+
+if( BUILD_LIRC_PLUGIN )
+ pkg_search_module( LIRC lirc )
+ if( NOT LIRC_FOUND )
+ tde_message_fatal( "lirc support is requested, but was not found on your system" )
+ endif( NOT LIRC_FOUND )
+endif( BUILD_LIRC_PLUGIN )
+
+
+##### check for OGG/Vorbis #####
+
+if( WITH_OGG )
+ pkg_search_module( VORBIS vorbis )
+ pkg_search_module( VORBISFILE vorbisfile )
+ pkg_search_module( VORBISENC vorbisenc )
+ pkg_search_module( OGG ogg )
+ if( NOT VORBIS_FOUND )
+ tde_message_fatal( "vorbis is requested, but was not found on your system" )
+ elseif( NOT VORBISFILE_FOUND OR NOT VORBISENC_FOUND OR NOT OGG_FOUND )
+ tde_message_fatal( "vorbis is requested, but some of it's essential parts wasn't found on your system" )
+ endif( )
+ set( HAVE_OGG 1 )
+endif( WITH_OGG )
+
+
+##### check for sndfile #####
+
+pkg_search_module( SNDFILE sndfile )
+if( NOT SNDFILE_FOUND )
+ tde_message_fatal( "sndfile is required, but was not found on your system" )
+endif( )
+
+
+##### Check for videodev #####
+
+check_include_file( "linux/videodev2.h" HAVE_VIDEODEV2_H )
+if( HAVE_VIDEODEV2_H )
+ set( HAVE_V4L2 1 )
+endif( )