diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-04 16:23:49 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-08-06 17:09:43 +0900 |
commit | b7e134e27e65c5cc4ae2cd49d41f680ffa20a593 (patch) | |
tree | c5dc23628f49091d3f6e8e82f5bb556985399020 /ConfigureChecks.cmake | |
parent | 0984c8a873d7ed24259cf1ba600a3c989cdb3b08 (diff) | |
download | k9copy-b7e134e27e65c5cc4ae2cd49d41f680ffa20a593.tar.gz k9copy-b7e134e27e65c5cc4ae2cd49d41f680ffa20a593.zip |
Conversion to cmake build system
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 4aae9b72d7164684622eab039f82833d02d3ce7a)
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..3a9bbd2 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,99 @@ +########################################### +# # +# 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 ) + + +##### libdvdread + +pkg_search_module ( LIBDVDREAD dvdread REQUIRED ) +if ( NOT LIBDVDREAD_FOUND ) + tde_message_fatal( "libdvdread is required, but was not found on your system" ) +endif ( ) + + +##### ffmpeg + +pkg_search_module( LIBAVCODEC libavcodec ) +if( NOT LIBAVCODEC_FOUND ) + tde_message_fatal( "libavcodec is required, but was not found on your system" ) +endif( ) + +pkg_search_module( LIBAVFORMAT libavformat ) +if( NOT LIBAVFORMAT_FOUND ) + tde_message_fatal( "libavformat is required, but was not found on your system" ) +endif( ) + +pkg_search_module( LIBAVUTIL libavutil ) +if( NOT LIBAVUTIL_FOUND ) + tde_message_fatal( "libavutil is required, but was not found on your system" ) +endif( ) + +pkg_search_module( LIBSWSCALE libswscale ) +if( NOT LIBSWSCALE_FOUND ) + tde_message_fatal( "libswscale is required, but was not found on your system" ) +endif( ) + +##### k3bdevice library +find_library( HAVE_K3BDEVICE k3bdevice ) +if( HAVE_K3BDEVICE ) + set( K3BDEVICE_LIBRARY "k3bdevice" ) +else() + tde_message_fatal( "libk3bdevice is required, but was not found on your system" ) +endif( ) + + +##### OpenGL + +if( WITH_OPENGL ) + set( OpenGL_GL_PREFERENCE LEGACY ) + find_package( OpenGL ) + if( NOT OPENGL_FOUND ) + tde_message_fatal( "OpenGL is required, but was not found on your system" ) + endif( NOT OPENGL_FOUND ) + set( HAVE_OPENGL ${OPENGL_FOUND} ) +endif( WITH_OPENGL ) + + +##### types + +check_include_file( "inttypes.h" HAVE_INTTYPES_H ) +check_include_file( "stdint.h" HAVE_STDINT_H ) + + +##### architecture + +if( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i386" OR ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "i686" ) + set( ARCH_X86 1 ) +elseif( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64" ) + set( ARCH_X86_64 1 ) +elseif( ${CMAKE_SYSTEM_PROCESSOR} STREQUAL "alpha" ) + set( ARCH_ALPHA 1 ) +elseif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES ppc* ) + set( ARCH_PPC 1 ) +elseif( ${CMAKE_SYSTEM_PROCESSOR} MATCHES sparc* ) + set( ARCH_SPARC 1 ) +endif() + |