summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt79
-rw-r--r--ConfigureChecks.cmake50
-rw-r--r--config.h.cmake11
-rw-r--r--doc/CMakeLists.txt1
-rw-r--r--doc/da/CMakeLists.txt4
-rw-r--r--doc/en/CMakeLists.txt2
-rw-r--r--doc/es/CMakeLists.txt4
-rw-r--r--doc/it/CMakeLists.txt4
-rw-r--r--doc/pt/CMakeLists.txt4
-rw-r--r--doc/sv/CMakeLists.txt4
-rw-r--r--icons/CMakeLists.txt1
-rw-r--r--kplayer/CMakeLists.txt131
-rw-r--r--po/CMakeLists.txt1
13 files changed, 296 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..76b16b6
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,79 @@
+############################################
+# #
+# Improvements and feedbacks are welcome #
+# #
+# This file is released under GPL >= 3 #
+# #
+############################################
+
+
+cmake_minimum_required( VERSION 2.8 )
+
+
+#### general package setup
+
+project( kplayer )
+set( VERSION R14.1.0 )
+
+
+#### include essential cmake modules
+
+include( FindPkgConfig )
+include( CheckFunctionExists )
+include( CheckIncludeFile )
+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} )
+
+
+##### user requested modules
+
+option( BUILD_ALL "Build all" ON )
+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 "-Wl,--no-undefined" )
+set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
+
+
+##### directories
+
+add_subdirectory( ${PROJECT_NAME} )
+add_subdirectory( icons )
+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 )
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..470fd32
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,50 @@
+###########################################
+# #
+# 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)
+
+
+##### check for gcc visibility support
+
+if( WITH_GCC_VISIBILITY )
+ if( NOT UNIX )
+ tde_message_fatal( "gcc visibility support was requested, but your system is not *NIX" )
+ endif( NOT UNIX )
+ set( __KDE_HAVE_GCC_VISIBILITY 1 )
+ set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+endif( WITH_GCC_VISIBILITY )
+
+
+#### check for headers
+
+check_include_file( "sys/sysmacros.h" HAVE_SYS_SYSMACROS_H )
+
+
+##### gettext
+
+if( BUILD_TRANSLATIONS )
+ include( FindGettext )
+ if( GETTEXT_FOUND )
+ set( MSGFMT_EXECUTABLE ${GETTEXT_MSGFMT_EXECUTABLE}
+ CACHE FILEPATH "path to msgfmt executable" )
+ endif( GETTEXT_FOUND )
+
+ if( NOT MSGFMT_EXECUTABLE )
+ tde_message_fatal( "msgfmt is required but was not found on your system." )
+ endif( NOT MSGFMT_EXECUTABLE )
+endif( BUILD_TRANSLATIONS )
+
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..d123138
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1,11 @@
+#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 to 1 if you have "sys/sysmacros.h" header */
+#cmakedefine HAVE_SYS_SYSMACROS_H 1
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
new file mode 100644
index 0000000..6d0aa9f
--- /dev/null
+++ b/doc/CMakeLists.txt
@@ -0,0 +1 @@
+tde_auto_add_subdirectories( )
diff --git a/doc/da/CMakeLists.txt b/doc/da/CMakeLists.txt
new file mode 100644
index 0000000..57c38b9
--- /dev/null
+++ b/doc/da/CMakeLists.txt
@@ -0,0 +1,4 @@
+tde_create_handbook(
+ DESTINATION kplayer
+ LANG da
+)
diff --git a/doc/en/CMakeLists.txt b/doc/en/CMakeLists.txt
new file mode 100644
index 0000000..3f08b65
--- /dev/null
+++ b/doc/en/CMakeLists.txt
@@ -0,0 +1,2 @@
+tde_create_handbook( DESTINATION kplayer )
+
diff --git a/doc/es/CMakeLists.txt b/doc/es/CMakeLists.txt
new file mode 100644
index 0000000..ce563b1
--- /dev/null
+++ b/doc/es/CMakeLists.txt
@@ -0,0 +1,4 @@
+tde_create_handbook(
+ DESTINATION kplayer
+ LANG es
+)
diff --git a/doc/it/CMakeLists.txt b/doc/it/CMakeLists.txt
new file mode 100644
index 0000000..ac324c5
--- /dev/null
+++ b/doc/it/CMakeLists.txt
@@ -0,0 +1,4 @@
+tde_create_handbook(
+ DESTINATION kplayer
+ LANG it
+)
diff --git a/doc/pt/CMakeLists.txt b/doc/pt/CMakeLists.txt
new file mode 100644
index 0000000..6a2259c
--- /dev/null
+++ b/doc/pt/CMakeLists.txt
@@ -0,0 +1,4 @@
+tde_create_handbook(
+ DESTINATION kplayer
+ LANG pt
+)
diff --git a/doc/sv/CMakeLists.txt b/doc/sv/CMakeLists.txt
new file mode 100644
index 0000000..efc5ad4
--- /dev/null
+++ b/doc/sv/CMakeLists.txt
@@ -0,0 +1,4 @@
+tde_create_handbook(
+ DESTINATION kplayer
+ LANG sv
+)
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
new file mode 100644
index 0000000..06df451
--- /dev/null
+++ b/icons/CMakeLists.txt
@@ -0,0 +1 @@
+tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons )
diff --git a/kplayer/CMakeLists.txt b/kplayer/CMakeLists.txt
new file mode 100644
index 0000000..1e4dc4f
--- /dev/null
+++ b/kplayer/CMakeLists.txt
@@ -0,0 +1,131 @@
+include_directories(
+ ${CMAKE_BINARY_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TDE_INCLUDE_DIR}
+ ${TQT_INCLUDE_DIRS}
+ ${CMAKE_BINARY_DIR}
+)
+
+link_directories(
+ ${TQT_LIBRARY_DIRS}
+ ${TDE_LIB_DIR}
+)
+
+
+##### kplayernoinst (static)
+
+tde_add_library( kplayernoinst STATIC_PIC AUTOMOC
+
+ SOURCES
+ kplayerpropertiesgeneral.ui
+ kplayerpropertiessize.ui
+ kplayerpropertiessubtitles.ui
+ kplayerpropertiesaudio.ui
+ kplayerpropertiesvideo.ui
+ kplayerpropertiesadvanced.ui
+ x11.cpp
+ kplayerwidget.cpp
+ kplayerslideraction.cpp
+ kplayerprocess.cpp
+ kplayersettings.cpp
+ kplayerproperties.cpp
+ kplayeractionlist.cpp
+ kplayerengine.cpp
+ kplayersource.cpp
+ kplayernode.cpp
+ kplayerpropertiesdialog.cpp
+ LINK
+ tdeio-shared
+ tdeui-shared
+ tdecore-shared
+)
+
+
+##### libkplayerpart (kpart)
+
+tde_add_kpart( libkplayerpart AUTOMOC
+
+ SOURCES
+ kplayerpart.cpp
+ LINK
+ tdeio-shared
+ tdeui-shared
+ tdecore-shared
+ tdeparts-shared
+ kplayernoinst-static
+
+ DESTINATION ${PLUGIN_INSTALL_DIR}
+)
+
+##### kplayer (executable)
+
+tde_add_executable( ${PROJECT_NAME} AUTOMOC
+
+ SOURCES
+ kplayerpropertiesgeneral.ui
+ kplayerpropertiessize.ui
+ kplayerpropertiessubtitles.ui
+ kplayerpropertiesaudio.ui
+ kplayerpropertiesvideo.ui
+ kplayerpropertiesadvanced.ui
+ kplayerpropertiesdevice.ui
+ kplayersettingssubtitles.ui
+ kplayersettingsbrightness.ui
+ kplayersettingsvolume.ui
+ kplayersettingssaturation.ui
+ kplayersettingsprogress.ui
+ kplayersettingshue.ui
+ kplayersettingscontrols.ui
+ kplayersettingssliders.ui
+ kplayersettingscontrast.ui
+ kplayersettingsvideo.ui
+ kplayersettingsaudio.ui
+ kplayersettingsadvanced.ui
+ kplayersettingsgeneral.ui
+ kplayer.cpp
+ main.cpp
+ kplayernodeaction.cpp
+ kplayernodeview.cpp
+ kplayerplaylist.cpp
+ kplayersettingsdialog.cpp
+ kplayerlogwindow.cpp
+ LINK
+ tdeio-shared
+ tdeui-shared
+ tdecore-shared
+ tdeparts-shared
+ kplayernoinst-static
+
+ DESTINATION ${BIN_INSTALL_DIR}
+)
+
+##### icons
+
+tde_install_icons( ${PROJECT_NAME} )
+
+
+##### other data
+
+install(
+ FILES
+ kplayer-play-queue.desktop kplayer-next.desktop
+ kplayer-directory.desktop kplayer-actions.desktop
+
+ DESTINATION ${DATA_INSTALL_DIR}/konqueror/servicemenus
+)
+
+install(
+ FILES kplayerpart.desktop
+ DESTINATION ${SERVICES_INSTALL_DIR}
+)
+
+install(
+ FILES ${PROJECT_NAME}.desktop
+ DESTINATION ${XDG_APPS_INSTALL_DIR}
+)
+
+install(
+ FILES input.conf kplayerui.rc kplayerpartui.rc
+ DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}
+)
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644
index 0000000..f5a2e1b
--- /dev/null
+++ b/po/CMakeLists.txt
@@ -0,0 +1 @@
+tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )