Branch: master

625c20b0 2018-12-15 12:25:07 gregory guy
conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@...>
A CMakeLists.txt
A ConfigureChecks.cmake
A config.h.cmake
A doc/CMakeLists.txt
A doc/da/CMakeLists.txt
A doc/en/CMakeLists.txt
A doc/es/CMakeLists.txt
A doc/it/CMakeLists.txt
A doc/pt/CMakeLists.txt
A doc/sv/CMakeLists.txt
A icons/CMakeLists.txt
A kplayer/CMakeLists.txt
A po/CMakeLists.txt

CMakeLists.txt

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 )

ConfigureChecks.cmake

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

config.h.cmake

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

doc/CMakeLists.txt

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

doc/da/CMakeLists.txt

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

doc/en/CMakeLists.txt

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

doc/es/CMakeLists.txt

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

doc/it/CMakeLists.txt

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

doc/pt/CMakeLists.txt

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

doc/sv/CMakeLists.txt

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

icons/CMakeLists.txt

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 ) 

kplayer/CMakeLists.txt

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}
+)
+
** Diff limit reached (max: 250 lines) **
040a8fde 2018-12-16 14:02:00 Slávek Banko
Add missing config.h include in kplayernode.cpp.
This relates to commit 2ea1d5f3.

Signed-off-by: Slávek Banko <slavek.banko@...>
M kplayer/kplayernode.cpp
** Diff limit reached (max: 250 lines) **
99eae31b 2018-12-16 14:02:45 Slávek Banko
Add includes to UI files to resolve FTBFS.

Signed-off-by: Slávek Banko <slavek.banko@...>
M kplayer/kplayersettingssubtitles.ui
** Diff limit reached (max: 250 lines) **
2618e55f 2018-12-16 15:35:44 Slávek Banko
Add CMakeL10n rules.
Create translation template.

Signed-off-by: Slávek Banko <slavek.banko@...>
A CMakeL10n.txt
A kplayer/CMakeL10n.txt
A po/kplayer.pot
M po/CMakeLists.txt
** Diff limit reached (max: 250 lines) **
90810e83 2018-12-16 15:46:01 TDE Weblate
Update translation files

Updated by Update PO files to match POT (msgmerge) hook in Weblate.
M po/be.po
M po/br.po
M po/ca.po
M po/cs.po
M po/cy.po
M po/da.po
M po/de.po
M po/el.po
M po/en_GB.po
M po/es.po
M po/et.po
M po/fi.po
M po/fr.po
M po/ga.po
M po/gl.po
M po/he.po
M po/hu.po
M po/it.po
M po/ja.po
M po/nb.po
M po/nl.po
M po/pa.po
M po/pl.po
M po/pt.po
M po/pt_BR.po
M po/ru.po
M po/sr.po
M po/sr@...
M po/sv.po
M po/tr.po
M po/zh_CN.po
** Diff limit reached (max: 250 lines) **