From 3b5c4c74473e99bee211d454d857fe325b4c55aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Mon, 24 Dec 2018 15:08:52 +0100 Subject: [PATCH] Conversion to the CMake building system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- CMakeLists.txt | 65 ++++++++++++++++++++++++++++++++++++++++ ConfigureChecks.cmake | 27 +++++++++++++++++ da/CMakeLists.txt | 1 + da/doc/CMakeLists.txt | 4 +++ de/CMakeLists.txt | 1 + de/doc/CMakeLists.txt | 4 +++ es/CMakeLists.txt | 1 + es/doc/CMakeLists.txt | 6 ++++ et/CMakeLists.txt | 1 + et/doc/CMakeLists.txt | 4 +++ fr/CMakeLists.txt | 1 + fr/doc/CMakeLists.txt | 4 +++ it/CMakeLists.txt | 1 + it/doc/CMakeLists.txt | 4 +++ nl/CMakeLists.txt | 1 + nl/doc/CMakeLists.txt | 4 +++ pl/CMakeLists.txt | 1 + pl/doc/CMakeLists.txt | 4 +++ pt/CMakeLists.txt | 1 + pt/doc/CMakeLists.txt | 4 +++ pt_BR/CMakeLists.txt | 1 + pt_BR/doc/CMakeLists.txt | 4 +++ ru/CMakeLists.txt | 1 + ru/doc/CMakeLists.txt | 4 +++ sv/CMakeLists.txt | 1 + sv/doc/CMakeLists.txt | 4 +++ 26 files changed, 154 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 ConfigureChecks.cmake create mode 100644 da/CMakeLists.txt create mode 100644 da/doc/CMakeLists.txt create mode 100644 de/CMakeLists.txt create mode 100644 de/doc/CMakeLists.txt create mode 100644 es/CMakeLists.txt create mode 100644 es/doc/CMakeLists.txt create mode 100644 et/CMakeLists.txt create mode 100644 et/doc/CMakeLists.txt create mode 100644 fr/CMakeLists.txt create mode 100644 fr/doc/CMakeLists.txt create mode 100644 it/CMakeLists.txt create mode 100644 it/doc/CMakeLists.txt create mode 100644 nl/CMakeLists.txt create mode 100644 nl/doc/CMakeLists.txt create mode 100644 pl/CMakeLists.txt create mode 100644 pl/doc/CMakeLists.txt create mode 100644 pt/CMakeLists.txt create mode 100644 pt/doc/CMakeLists.txt create mode 100644 pt_BR/CMakeLists.txt create mode 100644 pt_BR/doc/CMakeLists.txt create mode 100644 ru/CMakeLists.txt create mode 100644 ru/doc/CMakeLists.txt create mode 100644 sv/CMakeLists.txt create mode 100644 sv/doc/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f71b1f9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,65 @@ +################################################# +# +# (C) 2018 Slávek Banko +# slavek.banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +cmake_minimum_required( VERSION 2.8 ) + + +##### general package setup ##################### + +project( gwenview-i18n ) +set( VERSION R14.1.0 ) + + +##### include essential cmake modules ########### + +include( FindPkgConfig ) + + +##### 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( BUILD_ALL "Build all" ON ) +option( BUILD_DOC "Build documentation" ${BUILD_ALL} ) +option( BUILD_TRANSLATIONS "Build translations" ${BUILD_ALL} ) + + +##### configure checks + +include( ConfigureChecks.cmake ) + + +###### build translations for all languages ##### + +if( BUILD_TRANSLATIONS ) + file( GLOB_RECURSE po_files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} */messages/*.po ) + + foreach( _po ${po_files} ) + string( REPLACE "/" ";" _path "${_po}" ) + list( GET _path 0 _lang ) + tde_create_translation( FILES ${_po} LANG ${_lang} ) + endforeach( ) +endif( ) + + +###### subdirectories ########################### + +tde_auto_add_subdirectories( ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake new file mode 100644 index 0000000..7fff420 --- /dev/null +++ b/ConfigureChecks.cmake @@ -0,0 +1,27 @@ +########################################### +# # +# Improvements and feedback are welcome # +# # +# This file is released under GPL >= 3 # +# # +########################################### + + +# required stuff +find_package( TQt ) +find_package( TDE ) + + +##### 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/da/CMakeLists.txt b/da/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/da/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/da/doc/CMakeLists.txt b/da/doc/CMakeLists.txt new file mode 100644 index 0000000..a01a3ce --- /dev/null +++ b/da/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG da +) diff --git a/de/CMakeLists.txt b/de/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/de/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/de/doc/CMakeLists.txt b/de/doc/CMakeLists.txt new file mode 100644 index 0000000..d7616f6 --- /dev/null +++ b/de/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG de +) diff --git a/es/CMakeLists.txt b/es/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/es/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/es/doc/CMakeLists.txt b/es/doc/CMakeLists.txt new file mode 100644 index 0000000..8b27333 --- /dev/null +++ b/es/doc/CMakeLists.txt @@ -0,0 +1,6 @@ +###### the handbook seems incomplete - the index is missing + +# tde_create_handbook( +# DESTINATION gwenview +# LANG es +# ) diff --git a/et/CMakeLists.txt b/et/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/et/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/et/doc/CMakeLists.txt b/et/doc/CMakeLists.txt new file mode 100644 index 0000000..f4f5d1e --- /dev/null +++ b/et/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG et +) diff --git a/fr/CMakeLists.txt b/fr/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/fr/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/fr/doc/CMakeLists.txt b/fr/doc/CMakeLists.txt new file mode 100644 index 0000000..268fdc3 --- /dev/null +++ b/fr/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG fr +) diff --git a/it/CMakeLists.txt b/it/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/it/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/it/doc/CMakeLists.txt b/it/doc/CMakeLists.txt new file mode 100644 index 0000000..b8635d7 --- /dev/null +++ b/it/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG it +) diff --git a/nl/CMakeLists.txt b/nl/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/nl/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/nl/doc/CMakeLists.txt b/nl/doc/CMakeLists.txt new file mode 100644 index 0000000..cc52e4a --- /dev/null +++ b/nl/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG nl +) diff --git a/pl/CMakeLists.txt b/pl/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/pl/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/pl/doc/CMakeLists.txt b/pl/doc/CMakeLists.txt new file mode 100644 index 0000000..66f5211 --- /dev/null +++ b/pl/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG pl +) diff --git a/pt/CMakeLists.txt b/pt/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/pt/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/pt/doc/CMakeLists.txt b/pt/doc/CMakeLists.txt new file mode 100644 index 0000000..b6e609b --- /dev/null +++ b/pt/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG pt +) diff --git a/pt_BR/CMakeLists.txt b/pt_BR/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/pt_BR/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/pt_BR/doc/CMakeLists.txt b/pt_BR/doc/CMakeLists.txt new file mode 100644 index 0000000..ec07bbc --- /dev/null +++ b/pt_BR/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG pt_BR +) diff --git a/ru/CMakeLists.txt b/ru/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/ru/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/ru/doc/CMakeLists.txt b/ru/doc/CMakeLists.txt new file mode 100644 index 0000000..af1d996 --- /dev/null +++ b/ru/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG ru +) diff --git a/sv/CMakeLists.txt b/sv/CMakeLists.txt new file mode 100644 index 0000000..ba78952 --- /dev/null +++ b/sv/CMakeLists.txt @@ -0,0 +1 @@ +tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/sv/doc/CMakeLists.txt b/sv/doc/CMakeLists.txt new file mode 100644 index 0000000..96dfe9b --- /dev/null +++ b/sv/doc/CMakeLists.txt @@ -0,0 +1,4 @@ +tde_create_handbook( + DESTINATION gwenview + LANG sv +)