Browse Source

Conversion to the cmake building system.

A man page taken fron the Debian packaging system has
been added.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
pull/3/head
gregory guy 2 years ago
committed by Slávek Banko
parent
commit
5ebdc209a7
No known key found for this signature in database GPG Key ID: 608F5293A04BE668
  1. 89
      CMakeLists.txt
  2. 175
      ConfigureChecks.cmake
  3. 33
      config.h.cmake
  4. 1
      doc/CMakeLists.txt
  5. 4
      doc/da/CMakeLists.txt
  6. 4
      doc/de/CMakeLists.txt
  7. 1
      doc/en/CMakeLists.txt
  8. 4
      doc/es/CMakeLists.txt
  9. 4
      doc/et/CMakeLists.txt
  10. 4
      doc/fr/CMakeLists.txt
  11. 4
      doc/it/CMakeLists.txt
  12. 5
      doc/man/CMakeLists.txt
  13. 79
      doc/man/kmplayer.1
  14. 4
      doc/nl/CMakeLists.txt
  15. 4
      doc/pt/CMakeLists.txt
  16. 4
      doc/ru/CMakeLists.txt
  17. 4
      doc/sv/CMakeLists.txt
  18. 1
      icons/CMakeLists.txt
  19. 2
      mimetypes/CMakeLists.txt
  20. 6
      mimetypes/application/CMakeLists.txt
  21. 6
      mimetypes/audio/CMakeLists.txt
  22. 6
      mimetypes/video/CMakeLists.txt
  23. 6
      mimetypes/video/trinity1/CMakeLists.txt
  24. 5
      po/CMakeLists.txt
  25. 8
      protocols/CMakeLists.txt
  26. 241
      src/CMakeLists.txt

89
CMakeLists.txt

@ -0,0 +1,89 @@
############################################
# #
# Improvements and feedbacks are welcome #
# #
# This file is released under GPL >= 3 #
# #
############################################
cmake_minimum_required( VERSION 2.8 )
#### general package setup
project( kmplayer )
set( VERSION R14.1.0 )
#### include essential cmake modules
include( FindPkgConfig )
include( CheckFunctionExists )
include( CheckSymbolExists )
include( CheckIncludeFile )
include( CheckIncludeFileCXX )
include( CheckLibraryExists )
include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles )
#### include our cmake modules
set( CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" )
include( TDEMacros )
##### setup install paths
include( TDESetupPaths )
tde_setup_paths( )
##### optional stuff
option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( WITH_GCC_VISIBILITY "Enable fvisibility and fvisibility-inlines-hidden" ${WITH_ALL_OPTIONS} )
option( WITH_CAIRO "Enable support for cairo" ${WITH_ALL_OPTIONS} )
option( WITH_EXPAT "Enable support for expat" ${WITH_ALL_OPTIONS} )
option( WITH_XTEST "Enable support for XTest" ${WITH_ALL_OPTIONS} )
##### user requested modules
option( BUILD_ALL "Build all" OFF )
option( BUILD_KXINEPLAYER "Build kxineplayer" ${BUILD_ALL} )
option( BUILD_KXVPLAYER "Build kxvplayer" ${BUILD_ALL} )
option( BUILD_KGSTPLAYER "Build kgstplayer" ${BUILD_ALL} )
option( BUILD_KNPPLAYER "Build knpplayer" ${BUILD_ALL} )
option( BUILD_KOFFICE_PLUGIN "Build koffice plugin" ${BUILD_ALL} )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} )
##### configure checks
include( ConfigureChecks.cmake )
###### global compiler settings
add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
##### directories
add_subdirectory( src )
add_subdirectory( icons )
add_subdirectory( mimetypes )
tde_conditional_add_subdirectory( BUILD_DOC doc )
tde_conditional_add_subdirectory( BUILD_TRANSLATIONS po )
##### write configure files
configure_file( config.h.cmake config.h @ONLY )

175
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 )

33
config.h.cmake

@ -0,0 +1,33 @@
#define VERSION "@VERSION@"
// Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __KDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
/* Defined if you have the cairo library */
#cmakedefine HAVE_CAIRO 1
/* Defined if you have the expat library */
#cmakedefine HAVE_EXPAT 1
/* Defined if you have the xine library (libxine) */
#cmakedefine HAVE_XINE 1
/* Defined if you have the nspr library */
#cmakedefine HAVE_NSPR 1
/* Defined if you have the dbus library */
#cmakedefine HAVE_DBUS 1
/* Defined if you have the gstreamer-1.0 library */
#cmakedefine HAVE_GSTREAMER 1
/* Defined if you have the xtest library */
#cmakedefine HAVE_XTEST 1
/* Defined if you have the koffice headers */
#cmakedefine HAVE_KOFFICE 1

1
doc/CMakeLists.txt

@ -0,0 +1 @@
tde_auto_add_subdirectories( )

4
doc/da/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG da
)

4
doc/de/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG de
)

1
doc/en/CMakeLists.txt

@ -0,0 +1 @@
tde_create_handbook( DESTINATION ${PROJECT_NAME} )

4
doc/es/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG es
)

4
doc/et/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG et
)

4
doc/fr/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG fr
)

4
doc/it/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG it
)

5
doc/man/CMakeLists.txt

@ -0,0 +1,5 @@
INSTALL(
FILES ${PROJECT_NAME}.1
DESTINATION ${MAN_INSTALL_DIR}/man1
COMPONENT doc
)

79
doc/man/kmplayer.1

@ -0,0 +1,79 @@
'\" -*- coding: us-ascii -*-
.if \n(.g .ds T< \\FC
.if \n(.g .ds T> \\F[\n[.fam]]
.de URL
\\$2 \(la\\$1\(ra\\$3
..
.if \n(.g .mso www.tmac
.TH kmplayer 1 2007-11-03 "" ""
.SH NAME
kmplayer \- a media player for TDE
.SH SYNOPSIS
'nh
.fi
.ad l
\fBkmplayer\fR \kx
.if (\nx>(\n(.l/2)) .nr x (\n(.l/5)
'in \n(.iu+\nxu
[
\fB\fIQt-options\fB\fR
] [
\fB\fITDE-options\fB\fR
]
'in \n(.iu-\nxu
.ad b
'hy
.SH DESCRIPTION
KMPlayer is a basic audio/video viewer application for TDE.
KMPlayer can:
* play DVD (DVDNav only with the Xine player).
* play VCD.
* let the backend players play from a pipe (read from stdin).
* play from a TV device (experimental).
* show backend player's console output.
* launch ffserver (only 0.4.8 works) when viewing from a v4l device.
* DCOP KMediaPlayer interface support.
* VDR viewer frontend (with *kxvplayer), configure VDR keys with standard TDE
shortcut configure window.
* Lots of configurable shortcuts. Highly recommended for the VDR keys
(if you have VDR) and volume increase/decrease.
.SH OPTIONS
All TDE and Qt
programs accept a some common command-line options. KMPlayer has no
application-specific options.
.PP
.TP
\*(T<\fB\-\-help\fR\*(T>
Show help about options
.TP
\*(T<\fB\-\-help\-qt\fR\*(T>
Show Qt specific options
.TP
\*(T<\fB\-\-help\-tde\fR\*(T>
Show TDE specific options
.TP
\*(T<\fB\-\-help\-all\fR\*(T>
Show all options
.TP
\*(T<\fB\-\-author\fR\*(T>
Show author information
.TP
\*(T<\fB\-v\fR\*(T>, \*(T<\fB\-\-version\fR\*(T>
Show version information
.TP
\*(T<\fB\-\-license\fR\*(T>
Show license information
.TP
\*(T<\fB\-\-\fR\*(T>
Indicates end of options
.SH COPYRIGHT
This manual page was written by Jonathan Patrick Davies
<\*(T<jpatrick@kubuntu.org\*(T>> for the
Ubuntu system (but may be used by others).
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU General Public License,
Version 2 or any later version published by the Free Software Foundation.
.PP
On Debian systems, the complete text of the GNU General Public
License can be found in
\*(T<\fI/usr/share/common\-licenses/GPL\fR\*(T>.

4
doc/nl/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG nl
)

4
doc/pt/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG pt
)

4
doc/ru/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG ru
)

4
doc/sv/CMakeLists.txt

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION ${PROJECT_NAME}
LANG sv
)

1
icons/CMakeLists.txt

@ -0,0 +1 @@
tde_install_icons( )

2
mimetypes/CMakeLists.txt

@ -0,0 +1,2 @@
add_subdirectory( application )
add_subdirectory( video )

6
mimetypes/application/CMakeLists.txt

@ -0,0 +1,6 @@
##### other data
install(
FILES x-kmplayer.desktop
DESTINATION ${MIME_INSTALL_DIR}/application
)

6
mimetypes/audio/CMakeLists.txt

@ -0,0 +1,6 @@
##### other data
install(
FILES x-ms-wma.desktop
DESTINATION ${MIME_INSTALL_DIR}/audio
)

6
mimetypes/video/CMakeLists.txt

@ -0,0 +1,6 @@
##### other data
install(
FILES x-ms-wmp.desktop
DESTINATION ${MIME_INSTALL_DIR}/video
)

6
mimetypes/video/trinity1/CMakeLists.txt

@ -0,0 +1,6 @@
##### other data
install(
FILES x-ms-wmv.desktop
DESTINATION ${MIME_INSTALL_DIR}/video
)

5
po/CMakeLists.txt

@ -0,0 +1,5 @@
file( GLOB _srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.po )
if( _srcs )
tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
endif( )

8
protocols/CMakeLists.txt

@ -0,0 +1,8 @@
install(
FILES
mms.protocol
rtsp.protocol
pnm.protocol
DESTINATION ${SERVICES_INSTALL_DIR}
)

241
src/CMakeLists.txt

@ -0,0 +1,241 @@
include_directories(
${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR}
${TDE_INCLUDE_DIR}/tde
${TQT_INCLUDE_DIRS}
${CAIRO_INCLUDE_DIRS}
${EXPAT_INCLUDE_DIRS}
${XINE_INCLUDE_DIRS}
${NSPR_INCLUDE_DIRS}
${DBUS_INCLUDE_DIRS}
${DBUS-TQT_INCLUDE_DIRS}
${GSTREAMER_INCLUDE_DIRS}
${GSTREAMER_VIDEO_INCLUDE_DIRS}
${GSTREAMER_PLUGIN_INCLUDE_DIRS}
${X11_INCLUDE_DIR}
${X11_XTest_INCLUDE_PATH}
${GDK2_INCLUDE_DIRS}
${GTK2_INCLUDE_DIRS}
${GLIB2_INCLUDE_DIRS}
${DBUS-GLIB_INCLUDE_DIRS}
)
link_directories(
${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
)
##### kmplayercommon (shared)
tde_add_library( kmplayercommon SHARED AUTOMOC
SOURCES
viewarea.cpp kmplayerview.cpp
playlistview.cpp kmplayercontrolpanel.cpp
kmplayerconfig.cpp pref.cpp
kmplayerprocess.cpp kmplayer_callback.skel
kmplayer_backend.stub kmplayerpartbase.cpp
kmplayerplaylist.cpp kmplayer_asx.cpp
kmplayer_smil.cpp kmplayer_rp.cpp
kmplayer_rss.cpp kmplayer_atom.cpp
kmplayer_xspf.cpp triestring.cpp
kmplayerpartbase.skel
LINK
tdecore-shared
tdeui-shared
tdeio-shared
tdeparts-shared
tdeutils-shared
tdemediaplayer
${CAIRO_LIBRARIES}
${EXPAT_LIBRARIES}
${XINE_LIBRARIES}
${X11_LIBRARIES}
${X11_XTest_LIB}
${NSPR_LIBRARIES}
${DBUS_LIBRARIES}
${GSTREAMER_LIBRARIES}
${DBUS-TQT_LIBRARIES}
DESTINATION ${LIB_INSTALL_DIR}
)
##### kmplayer (tdeinit)
tde_add_tdeinit_executable( ${PROJECT_NAME} AUTOMOC
SOURCES
main.cpp kmplayerapp.cpp
kmplayertvsource.cpp
kmplayerbroadcast.cpp
kmplayervdr.cpp
LINK
tdecore-shared
kmplayercommon-shared
${X11_XTest_LIB}
)
##### kmplayerbackend (static)
tde_add_library( kmplayerbackend STATIC_PIC AUTOMOC
SOURCES
kmplayer_backend.skel
kmplayer_callback.stub
)
##### libkmplayerpart (kpart)
tde_add_kpart( libkmplayerpart AUTOMOC
SOURCES
kmplayer_part.cpp
LINK
kmplayercommon-shared
DESTINATION ${PLUGIN_INSTALL_DIR}
)
##### kxineplayer (executable)
if( BUILD_KXINEPLAYER )
tde_add_executable( kxineplayer AUTOMOC
SOURCES
xineplayer.cpp
LINK
tdecore-shared
tdeui-shared
tdeio-shared
kmplayerbackend-static
${XINE_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)
endif()
##### kxvplayer (executable)
if( BUILD_KXVPLAYER )
tde_add_executable( kxvplayer AUTOMOC
SOURCES
xvplayer.cpp
LINK
tdecore-shared
tdeui-shared
tdeio-shared
kmplayerbackend-static
${X11_Xv_LIB}
DESTINATION ${BIN_INSTALL_DIR}
)
endif()
##### kgstplayer (executable)
if( BUILD_KGSTPLAYER )
tde_add_executable( kgstplayer AUTOMOC
SOURCES
gstplayer.cpp
LINK
tdecore-shared
tdeui-shared
tdeio-shared
kmplayerbackend-static
${GSTREAMER_LIBRARIES}
${GSTREAMER_VIDEO_LIBRARIES}
${GSTREAMER_PLUGIN_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)
endif()
##### knpplayer (executable)
if( BUILD_KNPPLAYER )
tde_add_executable( knpplayer AUTOMOC
SOURCES
npplayer.c
LINK
${NSPR_LIBRARIES}
${X11_LIBRARIES}
${GMODULE2_LIBRARIES}
${GDK2_LIBRARIES}
${GLIB2_LIBRARIES}
${DBUS-GLIB_LIBRARIES}
${GTHREAD_LIBRARIES}
${GTK2_LIBRARIES}
DESTINATION ${BIN_INSTALL_DIR}
)
endif()
##### kmplayerkofficepart (kpart)
if( BUILD_KOFFICE_PLUGIN )
tde_add_kpart( libkmplayerkofficepart AUTOMOC
SOURCES
kmplayer_koffice_part.cpp
LINK
kmplayercommon-shared
${KOFFICE_LIBRARIES}
DESTINATION ${PLUGIN_INSTALL_DIR}
)
endif()
##### other data
install(
FILES
bookmarks.xml
pluginsinfo
noise.gif
kmplayerui.rc
kmplayerpartui.rc
DESTINATION ${DATA_INSTALL_DIR}/kmplayer
)
install(
FILES ${PROJECT_NAME}.desktop
DESTINATION ${XDG_APPS_INSTALL_DIR}
)
install(
FILES kmplayerrc
DESTINATION ${CONFIG_INSTALL_DIR}
)
install(
FILES kmplayer_part.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
if( BUILD_KOFFICE_PLUGIN )
install(
FILES kmplayer_koffice.desktop
DESTINATION ${SERVICES_INSTALL_DIR}
)
endif()
Loading…
Cancel
Save