diff options
author | gregory guy <[email protected]> | 2019-10-29 16:26:45 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2020-04-06 12:27:22 +0200 |
commit | 5ebdc209a7a6177fe640c6911eb74d2686b79db9 (patch) | |
tree | 43230f3ed4e6f9718bf15087fa419f0ea9a6c528 /ConfigureChecks.cmake | |
parent | df95dcb241a3f5e21946e0db517cdc74746b4ffb (diff) | |
download | kmplayer-5ebdc209a7a6177fe640c6911eb74d2686b79db9.tar.gz kmplayer-5ebdc209a7a6177fe640c6911eb74d2686b79db9.zip |
Conversion to the cmake building system.
A man page taken fron the Debian packaging system has
been added.
Signed-off-by: gregory guy <[email protected]>
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r-- | ConfigureChecks.cmake | 175 |
1 files changed, 175 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..4326a17 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,175 @@ +############################################ +# # +# Improvements and feedbacks 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 X11 + +find_package( X11 ) + + +##### check for cairo + +if( WITH_CAIRO ) +pkg_search_module( CAIRO cairo ) + +if( CAIRO_FOUND ) + set( HAVE_CAIRO 1 ) + else() + tde_message_fatal( "Cairo support has been requested but cairo was not found on your system." ) +endif() +endif( WITH_CAIRO ) + + +##### check for expat + +if( WITH_EXPAT ) +find_package( EXPAT ) + +if( EXPAT_FOUND ) + set( HAVE_EXPAT 1 ) + else() + tde_message_fatal( "Expat support has been requested but expat was not found on your system." ) +endif() +endif( WITH_EXPAT ) + + +##### check for XTest + +if( WITH_XTEST ) +if( X11_XTest_FOUND ) + set( HAVE_XTEST 1 ) + else() + tde_message_fatal( "XTest support has been requested but xtest was not found on your system." ) +endif() +endif( WITH_XTEST ) + + +##### check for npplayer + +if ( BUILD_KNPPLAYER ) +pkg_search_module( DBUS dbus-1 ) +pkg_search_module( DBUS-TQT dbus-tqt ) +pkg_search_module( NSPR nspr ) +pkg_search_module( GTK2 gtk+-2.0 ) +pkg_search_module( GLIB2 glib-2.0 ) +pkg_search_module( GDK2 gdk-x11-2.0 ) +pkg_search_module( GTHREAD gthread-2.0 ) +pkg_search_module( GMODULE2 gmodule-2.0 ) +pkg_search_module( DBUS-GLIB dbus-glib-1 ) + +if( DBUS_FOUND AND DBUS-TQT_FOUND ) + set( HAVE_DBUS 1 ) + else() + tde_message_fatal( "Dbus is required but dbus was not found on your system." ) +endif() + +if( NSPR_FOUND ) + set( HAVE_NSPR 1 ) + else() + tde_message_fatal( "Nspr support has been requested but nspr was not found on your system." ) +endif() + +if( NOT GTK2_FOUND ) + tde_message_fatal( "GTK2 support is required but was not found on your system." ) +endif() + +if( NOT GLIB2_FOUND ) + tde_message_fatal( "GLIB2 support is required but was not found on your system." ) +endif() + +if( NOT GDK2_FOUND ) + tde_message_fatal( "GDK2 support is required but was not found on your system." ) +endif() + +if( NOT GTHREAD_FOUND ) + tde_message_fatal( "GTHREAD support is required but was not found on your system." ) +endif() + +if( NOT GMODULE2_FOUND ) + tde_message_fatal( "GMODULE2 support is required but was not found on your system." ) +endif() + +if( NOT DBUS-GLIB_FOUND ) + tde_message_fatal( "DBUS-GLIB support is required but was not found on your system." ) +endif() +endif( BUILD_KNPPLAYER ) + + +##### check for xine-engine + +if( BUILD_KXINEPLAYER ) +pkg_search_module( XINE libxine ) + +if( XINE_FOUND ) + set( HAVE_XINE 1 ) + else() + tde_message_fatal( "Xine support has been requested but libxine was not found on your system." ) +endif() +endif( BUILD_KXINEPLAYER ) + + +##### check for gstreamer + +if( BUILD_KGSTPLAYER ) +pkg_search_module( GSTREAMER gstreamer-1.0>=1.0.0 gstreamer-0.10>=0.10.0 ) + +if( GSTREAMER_FOUND ) + set( HAVE_GSTREAMER 1 ) + else() + tde_message_fatal( "Gstreamer support has been requested but gstreamer was not found on your system." ) +endif() + +if( ${GSTREAMER_VERSION} GREATER "0.11.0" ) + pkg_search_module( GSTREAMER_VIDEO gstreamer-video-1.0 ) + pkg_search_module( GSTREAMER_PLUGIN gstreamer-plugins-base-1.0 ) +else() + pkg_search_module( GSTREAMER_VIDEO gstreamer-interfaces-0.10 ) + pkg_search_module( GSTREAMER_PLUGIN gstreamer-plugins-base-0.10 ) +endif() + +message( STATUS "gstreamer version: ${GSTREAMER_VERSION}" ) +message( STATUS "gstreamer video version: ${GSTREAMER_VIDEO_VERSION}" ) +message( STATUS "gstreamer plugins version: ${GSTREAMER_PLUGIN_VERSION}" ) +endif( BUILD_KGSTPLAYER ) + + +##### check for koffice-plugin + +if( BUILD_KOFFICE_PLUGIN ) +find_path( KOFFICE_INCLUDE_DIR + NAMES KoDocument.h + HINTS + ${TQT_INCLUDE_DIRS} + ${TDE_INCLUDE_DIR} + ${TDE_INCLUDE_DIR}/tde +) +if( "${KOFFICE_INCLUDE_DIR}" STREQUAL "KOFFICE_INCLUDE_DIR-NOTFOUND" ) + tde_message_fatal( "KOffice plugin is requested but KOffice headers were not found on your system." ) +endif( ) +set( HAVE_KOFFICE 1 CACHE INTERNAL "" ) +set( KOFFICE_LIBRARIES kofficecore kofficeui ) +endif( BUILD_KOFFICE_PLUGIN ) |