conversion to the cmake building system

Signed-off-by: gregory guy <g-gregory@gmx.fr>
pull/1/head
gregory guy 6 years ago
parent c397dac9ff
commit 625c20b068
No known key found for this signature in database
GPG Key ID: 6EFE0EF249A874C0

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

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

@ -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

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

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION kplayer
LANG da
)

@ -0,0 +1,2 @@
tde_create_handbook( DESTINATION kplayer )

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION kplayer
LANG es
)

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION kplayer
LANG it
)

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION kplayer
LANG pt
)

@ -0,0 +1,4 @@
tde_create_handbook(
DESTINATION kplayer
LANG sv
)

@ -0,0 +1 @@
tde_install_icons( DESTINATION ${DATA_INSTALL_DIR}/${PROJECT_NAME}/icons )

@ -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}
)

@ -0,0 +1 @@
tde_create_translation( LANG auto OUTPUT_NAME ${PROJECT_NAME} )
Loading…
Cancel
Save