Update cmake files to latest TDE standard

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/3/head
Michele Calgaro 3 months ago
parent 3246c49f3c
commit 1fd75f67d7
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -5,7 +5,18 @@
# This software is licensed under the terms of the GNU GPL v3 license. # # This software is licensed under the terms of the GNU GPL v3 license. #
################################################################################ ################################################################################
cmake_minimum_required( VERSION 3.1 )
##### set project version ########################
include( TDEVersion )
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
##### include our cmake modules #################
include( TDEL10n ) include( TDEL10n )
##### create translation templates ##############
tde_l10n_auto_add_subdirectories( ) tde_l10n_auto_add_subdirectories( )

@ -5,11 +5,21 @@
# This software is licensed under the terms of the GNU GPL v3 license. # # This software is licensed under the terms of the GNU GPL v3 license. #
################################################################################ ################################################################################
cmake_minimum_required( VERSION 3.1 )
project( kcm_alternatives ) ##### set project version ########################
include( TDEVersion )
cmake_minimum_required( VERSION ${TDE_CMAKE_MINIMUM_VERSION} )
tde_set_project_version( )
#### general package setup
project( tdealternatives )
#### include essential cmake modules
### Required modules ###########################################################
include( FindPkgConfig ) include( FindPkgConfig )
include( CheckFunctionExists ) include( CheckFunctionExists )
include( CheckSymbolExists ) include( CheckSymbolExists )
@ -18,36 +28,59 @@ include( CheckLibraryExists )
include( CheckCSourceCompiles ) include( CheckCSourceCompiles )
include( CheckCXXSourceCompiles ) include( CheckCXXSourceCompiles )
### TDE macros #################################################################
#### include our cmake modules
include( TDEMacros ) include( TDEMacros )
tde_set_project_version( )
##### setup install paths
include( TDESetupPaths ) include( TDESetupPaths )
tde_setup_paths( ) tde_setup_paths( )
### Optional support ###########################################################
option( WITH_DISTRIBUTION_DPKG "Enable support for DPKG package manager" OFF )
option( WITH_DISTRIBUTION_RPM "Enable support for RPM package manager" OFF )
### Modules to build ########################################################### ##### optional stuff
option( BUILD_ALL "Build all" ON )
option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) option( WITH_ALL_OPTIONS "Enable all optional support" OFF )
option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) option( WITH_DISTRIBUTION_DPKG "Enable support for DPKG package manager" OFF )
option( WITH_DISTRIBUTION_RPM "Enable support for RPM package manager" 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
### Configure checks ###########################################################
include( ConfigureChecks.cmake ) include( ConfigureChecks.cmake )
### Compiler settings ##########################################################
###### global compiler settings
add_definitions( -DHAVE_CONFIG_H ) add_definitions( -DHAVE_CONFIG_H )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" ) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TQT_CXX_FLAGS}" )
set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined" )
set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" ) set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined" )
### Add subdirectories #########################################################
##### directories
add_subdirectory( src ) add_subdirectory( src )
##### other data ################################
tde_conditional_add_project_docs( BUILD_DOC ) tde_conditional_add_project_docs( BUILD_DOC )
tde_conditional_add_project_translations( BUILD_TRANSLATIONS ) tde_conditional_add_project_translations( BUILD_TRANSLATIONS )
### Write configuration ########################################################
configure_file( config.h.cmake config.h @ONLY ) ##### write configure files
configure_file( config.h.cmake config.h @ONLY )

@ -5,6 +5,8 @@
# This software is licensed under the terms of the GNU GPL v3 license. # # This software is licensed under the terms of the GNU GPL v3 license. #
################################################################################ ################################################################################
# required stuff
find_package( TQt ) find_package( TQt )
find_package( TDE ) find_package( TDE )
@ -16,6 +18,8 @@ test_big_endian( WORDS_BIGENDIAN )
tde_setup_largefiles( ) tde_setup_largefiles( )
##### check for gcc visibility support
if( WITH_GCC_VISIBILITY ) if( WITH_GCC_VISIBILITY )
tde_setup_gcc_visibility( ) tde_setup_gcc_visibility( )
endif( WITH_GCC_VISIBILITY ) endif( WITH_GCC_VISIBILITY )
@ -29,4 +33,4 @@ endif( )
if( WITH_DISTRIBUTION_DPKG AND WITH_DISTRIBUTION_RPM ) if( WITH_DISTRIBUTION_DPKG AND WITH_DISTRIBUTION_RPM )
tde_message_fatal("Multiple distributions selected. You should select only one distribution.") tde_message_fatal("Multiple distributions selected. You should select only one distribution.")
endif( ) endif( )

@ -3,10 +3,10 @@
// Defined if you have fvisibility and fvisibility-inlines-hidden support. // Defined if you have fvisibility and fvisibility-inlines-hidden support.
#cmakedefine __TDE_HAVE_GCC_VISIBILITY 1 #cmakedefine __TDE_HAVE_GCC_VISIBILITY 1
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most // Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */ // significant byte first (like Motorola and SPARC, unlike Intel).
#cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@ #cmakedefine WORDS_BIGENDIAN @WORDS_BIGENDIAN@
/* Distributions */ // Distributions
#cmakedefine WITH_DISTRIBUTION_DPKG @WITH_DISTRIBUTION_DPKG@ #cmakedefine WITH_DISTRIBUTION_DPKG @WITH_DISTRIBUTION_DPKG@
#cmakedefine WITH_DISTRIBUTION_RPM @WITH_DISTRIBUTION_RPM@ #cmakedefine WITH_DISTRIBUTION_RPM @WITH_DISTRIBUTION_RPM@

@ -5,11 +5,9 @@
# This software is licensed under the terms of the GNU GPL v3 license. # # This software is licensed under the terms of the GNU GPL v3 license. #
################################################################################ ################################################################################
tde_l10n_auto_add_subdirectories( )
tde_l10n_create_template( "messages/tdealternatives" ) tde_l10n_create_template( "messages/tdealternatives" )
tde_l10n_create_template( tde_l10n_create_template(
CATALOG "desktop_files/tdealternatives-desktops" CATALOG "desktop_files/tdealternatives-desktops"
SOURCES alternatives.desktop SOURCES tdealternatives.desktop
) )

@ -6,47 +6,36 @@
################################################################################ ################################################################################
include_directories( include_directories(
${CMAKE_BINARY_DIR} ${CMAKE_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
${TDE_INCLUDE_DIR} ${TDE_INCLUDE_DIR}
${TQT_INCLUDE_DIRS} ${TQT_INCLUDE_DIRS}
) )
link_directories( link_directories(
${TQT_LIBRARY_DIRS} ${TQT_LIBRARY_DIRS}
${TDE_LIB_DIR}
) )
### kcm_alternatives (module) ################################################## ### kcm_tdealternatives (module) ##################################################
tde_add_kpart(
kcm_alternatives AUTOMOC
tde_add_kpart( kcm_tdealternatives AUTOMOC
SOURCES SOURCES
addslavesui.ui addslavesui.ui propertieswindow.ui addalternativesui.ui mainwindow.ui
propertieswindow.ui altcontroller.cpp tdealternatives.cpp altparser.cpp altitemelement.cpp
addalternativesui.ui treeitemelement.cpp addslaves.cpp addalternatives.cpp
mainwindow.ui
altcontroller.cpp
tdealternatives.cpp
altparser.cpp
altitemelement.cpp
treeitemelement.cpp
addslaves.cpp
addalternatives.cpp
LINK LINK
tdeui-shared tdeui-shared tdeio-shared
tdeio-shared
DESTINATION ${PLUGIN_INSTALL_DIR} DESTINATION ${PLUGIN_INSTALL_DIR}
) )
### translated desktop files ################################################### ### translated desktop files ###################################################
tde_create_translated_desktop(alternatives.desktop) tde_create_translated_desktop( tdealternatives.desktop )
### data ####################################################################### ### data #######################################################################
@ -54,6 +43,6 @@ tde_create_translated_desktop(alternatives.desktop)
tde_install_icons( ) tde_install_icons( )
install( install(
FILES tdealternativesui.rc FILES tdealternativesui.rc
DESTINATION ${DATA_INSTALL_DIR}/tdealternatives/ DESTINATION ${DATA_INSTALL_DIR}/tdealternatives
) )

@ -47,7 +47,7 @@
#include "config.h" #include "config.h"
typedef KGenericFactory<TDEAlternatives, TQWidget> TDEAlternativesFactory; typedef KGenericFactory<TDEAlternatives, TQWidget> TDEAlternativesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_alternatives, TDEAlternativesFactory("kcm_alternatives")) K_EXPORT_COMPONENT_FACTORY( kcm_tdealternatives, TDEAlternativesFactory("kcm_tdealternatives"))
extern "C" extern "C"
{ {
@ -129,7 +129,7 @@ m_mgr = new AltFilesManager("/var/lib/rpm/alternatives");
m_statusCombo->setEnabled(false); m_statusCombo->setEnabled(false);
} }
myAboutData = new TDEAboutData("kcm_alternatives", I18N_NOOP("TDEAlternatives"), myAboutData = new TDEAboutData("kcm_tdealternatives", I18N_NOOP("Alternatives"),
VERSION, I18N_NOOP("DPKG/RPM alternatives manager for TDE"), VERSION, I18N_NOOP("DPKG/RPM alternatives manager for TDE"),
TDEAboutData::License_GPL, I18N_NOOP("(c) 2004 Juanjo Alvarez Martinez\n" TDEAboutData::License_GPL, I18N_NOOP("(c) 2004 Juanjo Alvarez Martinez\n"
"(c) 2004 Mario Bensi")); "(c) 2004 Mario Bensi"));

@ -1,11 +1,11 @@
[Desktop Entry] [Desktop Entry]
Encoding=UTF-8 Encoding=UTF-8
Exec=tdecmshell alternatives Exec=tdecmshell tdealternatives
Icon=tdealternatives Icon=tdealternatives
Type=Application Type=Application
X-TDE-ModuleType=Library X-TDE-ModuleType=Library
X-TDE-Library=alternatives X-TDE-Library=tdealternatives
X-TDE-RootOnly=true X-TDE-RootOnly=true
X-TDE-HasReadOnlyMode=true X-TDE-HasReadOnlyMode=true
X-TDE-ParentApp=kcontrol X-TDE-ParentApp=kcontrol
@ -13,4 +13,4 @@ X-TDE-ParentApp=kcontrol
Name=Alternatives Name=Alternatives
Comment=TDEAlternatives - DPKG/RPM alternatives manager for TDE Comment=TDEAlternatives - DPKG/RPM alternatives manager for TDE
Categories=Qt;TDE;X-TDE-settings-system; Categories=Qt;TDE;X-TDE-settings-system;
Keywords=applications;alternative;alternatives;dpkg;rpm;debian;devuan;ubuntu;redhat;fedora;mageia Keywords=applications;alternative;alternatives;tdealternative;tdealternatives;dpkg;rpm;debian;devuan;ubuntu;redhat;fedora;mageia

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-09 16:07+0300\n" "POT-Creation-Date: 2025-03-30 21:39+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,16 +17,16 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#. Name #. Name
#: alternatives.desktop:13 #: tdealternatives.desktop:13
msgid "Alternatives" msgid "Alternatives"
msgstr "" msgstr ""
#. Comment #. Comment
#: alternatives.desktop:14 #: tdealternatives.desktop:14
msgid "TDEAlternatives - DPKG/RPM alternatives manager for TDE" msgid "TDEAlternatives - DPKG/RPM alternatives manager for TDE"
msgstr "" msgstr ""
#. Keywords #. Keywords
#: alternatives.desktop:16 #: tdealternatives.desktop:16
msgid "applications;alternative;alternatives;dpkg;rpm;debian;devuan;ubuntu;redhat;fedora;mageia" msgid "applications;alternative;alternatives;tdealternative;tdealternatives;dpkg;rpm;debian;devuan;ubuntu;redhat;fedora;mageia"
msgstr "" msgstr ""

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2024-08-09 16:07+0300\n" "POT-Creation-Date: 2025-03-31 12:06+0900\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -56,69 +56,70 @@ msgstr ""
msgid "no description" msgid "no description"
msgstr "" msgstr ""
#: main.cpp:35 #: main.cpp:34
msgid "A TDE Manager for the Debian/Mandrake alternatives system" msgid "A TDE Manager for the Debian/Mandrake alternatives system"
msgstr "" msgstr ""
#: main.cpp:47 #: main.cpp:46
msgid "tdealternatives" msgid "tdealternatives"
msgstr "" msgstr ""
#: tdealternatives.cpp:85 #: tdealternatives.cpp:86
msgid "" msgid ""
"TDEAlternatives only works on systems which use the DPKG or RPM package " "TDEAlternatives only works on systems which use the DPKG or RPM package "
"manager." "manager."
msgstr "" msgstr ""
#: tdealternatives.cpp:86 #: tdealternatives.cpp:87
msgid "Wrong System Type" msgid "Wrong System Type"
msgstr "" msgstr ""
#: mainwindow.ui:349 tdealternatives.cpp:120 #: mainwindow.ui:349 tdealternatives.cpp:121
#, no-c-format #, no-c-format
msgid "&Add" msgid "&Add"
msgstr "" msgstr ""
#: mainwindow.ui:360 tdealternatives.cpp:121 #: mainwindow.ui:360 tdealternatives.cpp:122
#, no-c-format #, no-c-format
msgid "&Properties" msgid "&Properties"
msgstr "" msgstr ""
#: tdealternatives.cpp:131 #: mainwindow.ui:54 tdealternatives.cpp:132
msgid "TDEAlternatives" #, no-c-format
msgid "Alternatives"
msgstr "" msgstr ""
#: tdealternatives.cpp:132 #: tdealternatives.cpp:133
msgid "DPKG/RPM alternatives manager for TDE" msgid "DPKG/RPM alternatives manager for TDE"
msgstr "" msgstr ""
#: tdealternatives.cpp:133 #: tdealternatives.cpp:134
msgid "" msgid ""
"(c) 2004 Juanjo Alvarez Martinez\n" "(c) 2004 Juanjo Alvarez Martinez\n"
"(c) 2004 Mario Bensi" "(c) 2004 Mario Bensi"
msgstr "" msgstr ""
#: tdealternatives.cpp:342 #: tdealternatives.cpp:343
msgid "" msgid ""
"Description :\n" "Description :\n"
"%1\n" "%1\n"
msgstr "" msgstr ""
#: tdealternatives.cpp:343 #: tdealternatives.cpp:344
msgid "Path : %1\n" msgid "Path : %1\n"
msgstr "" msgstr ""
#: tdealternatives.cpp:344 #: tdealternatives.cpp:345
msgid "Priority : %1\n" msgid "Priority : %1\n"
msgstr "" msgstr ""
#: tdealternatives.cpp:347 #: tdealternatives.cpp:348
msgid "" msgid ""
"_n: Slave :\n" "_n: Slave :\n"
"Slaves :" "Slaves :"
msgstr "" msgstr ""
#: tdealternatives.cpp:454 #: tdealternatives.cpp:455
msgid "" msgid ""
"_: <h1>TDEAlternatives</h1>\n" "_: <h1>TDEAlternatives</h1>\n"
"\n" "\n"
@ -147,12 +148,7 @@ msgstr ""
#: mainwindow.ui:30 #: mainwindow.ui:30
#, no-c-format #, no-c-format
msgid "Alternatives Manager" msgid "TDE Alternatives Manager"
msgstr ""
#: mainwindow.ui:54
#, no-c-format
msgid "Alternatives"
msgstr "" msgstr ""
#: mainwindow.ui:117 #: mainwindow.ui:117

Loading…
Cancel
Save