Compare commits

...

140 Commits

Author SHA1 Message Date
Slávek Banko 96bb7dddfe
tde_create_handbook: Install symlink for 'common' part as relative.
2 years ago
Michele Calgaro f7cb5e1b3b
Allows tde macros to be used for processing .ui files in pure TQt
2 years ago
Michele Calgaro 26f52b5d7e
Make sure to check for existance of ${CMAKE_SOURCE_DIR}/.tdescminfo
2 years ago
Michele Calgaro 82576df1c0
Add macro to set project version at TDE-wide scope.
2 years ago
Slávek Banko 19614f4c61
Set C++11 as the required minimum standard.
2 years ago
Slávek Banko 2878ceef0c
tde_automoc: Add support for processing automoc for generated files.
2 years ago
Slávek Banko 321dec8aae
Add TQT_CMAKE_DIR variable.
2 years ago
Slávek Banko 8a83789891
tde_install_export: Sort individual exported files before generating
2 years ago
Slávek Banko f7402b3bc9
Add the ability to specify the necessary CXX features in tde_add_check_executable.
2 years ago
Slávek Banko d967cc1358
tde_create_handbook: Fix characters not permitted for target name.
3 years ago
Slávek Banko cd5734bcf2
Raise the minimum required version of CMake to 3.1.
3 years ago
Slávek Banko 24065538e3
Add the ability to specify the necessary CXX features.
3 years ago
Slávek Banko 939e590936
tde_create_handbook: Add *.gif files to automatically installed.
3 years ago
Slávek Banko 3869a49bc0
CMakeL10n: Prevent exclusion _translatorinfo when using X-POT.
3 years ago
Slávek Banko eeb27665a1
CMakeL10n: Fix the path for loading additional POT files.
3 years ago
Slávek Banko e7660a777a
CMakeL10n: Avoid option --use-first for msguniq call
3 years ago
Slávek Banko 2c7ad0cffc
tde_create_translated_desktop: Add the ability to merge translations into files in XML format.
3 years ago
Slávek Banko 964c35ef31
CMakeL10n: Allow to use more than one X-POT files.
3 years ago
Slávek Banko 1b97909f17
tde_create_handbook: Add *.jpg files to automatically installed.
3 years ago
Ray-V 0643c956f5
Update tde_add_project_* macros:
3 years ago
Slávek Banko 8b192e30cb
tde_add_project_translations: Add common rules for generating and installing project translations.
3 years ago
Slávek Banko 0d83e597f2
tde_add_project_docs: Add common rules for generating and installing project documentation.
3 years ago
Slávek Banko 03cdb8caf6
tde_create_translated_desktop: Fix characters not permitted for target name.
3 years ago
Slávek Banko 8fbb3fc156
tde_uic: Set CMAKE_MODULE_PATH only if it is needed. This prevents CMP0017.
3 years ago
Slávek Banko 26d3de3fcd
tde_add_ui_files: Use TDE_CMAKE_MODULES to determine the path for tde_uic.cmake.
3 years ago
Slávek Banko bfa3a90b73
Add CMake rules for installation as a standalone package.
3 years ago
Alexander Golubev 0c19587aec
tde_create_translated_desktop: Prevent FTBFS on generated desktop files
3 years ago
Slávek Banko 356a15955c
tde_create_translated_desktop: Prevent FTBFS if the length
3 years ago
Slávek Banko f8bcc8f595
tde_create_translated_desktop: Instead of preprocessing the desktop
3 years ago
Slávek Banko 9237b11955
tde_create_translated_desktop: Avoid confusing paths when processing
3 years ago
Slávek Banko 314a0453de
tde_create_translated_desktop: Use find_file instead of find_program
3 years ago
Slávek Banko df070851a5
tde_create_translated_desktop: Incorporate a slightly modified version
3 years ago
Slávek Banko fa9c40f346
tde_curdatetime: Add the -u option to call 'date'
3 years ago
Slávek Banko 8972568773
Set compiler flags useful for reproducible building.
3 years ago
Slávek Banko 1066eb1afd
tde_create_tarball: Add options to make tarballs reproducible
4 years ago
Slávek Banko 38b2578bd7
tde_create_translated_desktop: Show the full path of the source
4 years ago
Slávek Banko 42710c128d
Adjust CMakeL10n module to search for tde.pot in 'core/tdelibs' folder.
4 years ago
Michele Calgaro 136cfe6ca9
Added search for additional files to tde_l10n_create_template.
4 years ago
Slávek Banko 15a7e4670a
Add a global option to force colored output from compiler.
4 years ago
Slávek Banko 4397680ce9
tde_create_tarball: SOURCEDIR can be specified as relative.
4 years ago
Slávek Banko cd66012f18
tde_create_translated_desktop: Allow generating a translated desktop
4 years ago
Slávek Banko 31a11575ca
tde_create_translated_desktop: Fix CMP0054 warning in case of special
4 years ago
Slávek Banko 80ab8717cc
tde_create_translated_desktop: Fix processing when using configure_file.
4 years ago
Slávek Banko 47e0e2b4ab
tde_create_translated_desktop: Add the ability to process multiple source
4 years ago
Slávek Banko 05e7242b4e
tde_create_translated_desktop: PO_DIR can be specified as relative.
4 years ago
Slávek Banko b69bc31c49
tde_create_translated_desktop: Process the source file using configure_file
4 years ago
Slávek Banko a01b484d37
tde_create_translated_desktop: Add the ability to call for the same source
4 years ago
aneejit1 95f07c5d48
Remove use of LINGUAS file to prevent writes to the source directory
4 years ago
Slávek Banko da63fb4ac7
Remove adding dependencies that were previously needed
4 years ago
Slávek Banko a39c6e4f8e
Fix FTBS if CMAKE_BUILD_TYPE is not set.
4 years ago
Slávek Banko dca5663488
Set the LINK_INTERFACE_LIBRARIES and INTERFACE_LINK_LIBRARIES
4 years ago
Slávek Banko f639188b4d
tde_add_library: Add the ability to link libraries as private.
4 years ago
Slávek Banko be1fee9567
Move templates to a separate directory and rename to the tde_ prefix.
4 years ago
Slávek Banko 5715cbbaba
tde_create_translated_desktop: For working files in a binary directory,
4 years ago
Slávek Banko 2bd725d956
Update TDEL10n module
4 years ago
Slávek Banko 76b9e6c8e1
tde_create_dcop_kidl: Use dcopildng as the default instead of dcopidl.
4 years ago
Slávek Banko 0af47d3441
Update TDEL10n module
4 years ago
Slávek Banko 242e41b0dd
FindTDE: Conditional import of exported tdelibs targets.
4 years ago
Slávek Banko 350a4291ce
tde_create_handbook: Add an optional SOURCE_BASEDIR argument.
4 years ago
Slávek Banko cc66475995
tde_create_translated_desktop: Use output name only during installation.
4 years ago
Slávek Banko 81c6a60fac
Write metadata to libraries and executables using the post-build command,
4 years ago
Slávek Banko 74122e5d1f
tde_create_translated_desktop: Force the use of intltool-merge.
4 years ago
Slávek Banko 6351298434
Update TDEL10n module
4 years ago
Slávek Banko 083913c406
Write metadata to libraries and binaries as a last step.
4 years ago
Slávek Banko e2a19928ed
Add caching of variables from checks results and add conditions
4 years ago
Slávek Banko 5aa76deb8f
Update TDEL10n module
4 years ago
Slávek Banko 94d67073e5
Replace the remaining KDE3 macros.
4 years ago
Slávek Banko 6b58614fc4
tde_create_translated_desktop: Allow spaces around the equal sign.
4 years ago
Slávek Banko 51ace81f20
tde_create_handbook: Improve build message.
4 years ago
Slávek Banko ca47fa8330
Create symlink for base soname for libraries with release number in the name
4 years ago
Slávek Banko 66dda475f9
Store ELF metadata as a separate target instead of the POST_BUILD command.
4 years ago
Slávek Banko 61682145da
Avoid storing "_version-NOTFOUND" in ELF metadata.
4 years ago
Slávek Banko 7363ed42ff
tde_read_src_metadata: Typo correction.
4 years ago
Slávek Banko 23558fd690
tde_create_translated_desktop: Use full name for target.
4 years ago
Slávek Banko 89b5f26297
tde_create_translated_desktop: Cleaning the LINGUAS file
4 years ago
Slávek Banko f0659a0437
tde_create_tarball: Add options to ensure reproducibility.
4 years ago
Slávek Banko ca613e7db0
Update TDEL10n module
4 years ago
Slávek Banko e4ea4fb5f0
Update TDEL10n module
4 years ago
Slávek Banko 152ea86f76
Add support for creation of translated desktop files during build.
4 years ago
Slávek Banko e0f71ec8c7
Update TDEL10n module
4 years ago
Slávek Banko e4232ffcdf
Use the source package date or the source git repository date
4 years ago
Slávek Banko b3510baa2d
Add support for embedding libraries when building on SunOS.
4 years ago
Slávek Banko c51d14850f
Remove -fvisibility-inlines-hidden from CMAKE_C_FLAGS
5 years ago
Slávek Banko 6853feb760
Update TDEL10n module
5 years ago
Slávek Banko 47eede594a
Use cache for TQt executables paths.
5 years ago
Slávek Banko 0bf16de005
Update tde_add_check_executable macro
5 years ago
Slávek Banko cfc1242197
Fix installation of base soname for libraries with release number in the name.
5 years ago
Slávek Banko 177a2281dd
Add a function that determines the filename of the library
5 years ago
Slávek Banko 3fe0a2fcc3
Update tde_setup_gcc_visibility macro
5 years ago
Slávek Banko 03d0eff00d
Update tde_setup_dbus macro
5 years ago
Slávek Banko 7cad7c65d5
Add tde_setup_dbus macro.
5 years ago
Slávek Banko 55da314903
Add tde_setup_largefiles macro.
5 years ago
Slávek Banko 19102b8264
Use tde_setup_msgfmt in tde_create_translation if needed.
5 years ago
Slávek Banko d21d5a0067
Add tde_setup_msgfmt macro.
5 years ago
Slávek Banko 020249259a
Add tde_setup_gcc_visibility macro.
5 years ago
Slávek Banko f5594002a8
Update TDEL10n module
5 years ago
Slávek Banko 4bce22ab48
Update tde_create_tarball macro
5 years ago
Slávek Banko 30d86a1f29
Fix tde_create_tarball macro
5 years ago
Slávek Banko c90656946d
Update TDEL10n module
6 years ago
Slávek Banko ffda10ca01
Add tde_create_tarball macro.
6 years ago
Slávek Banko 41ac5e0ed4
Update TDEL10n module
6 years ago
Slávek Banko f056d89edd
Update TDEL10n module
6 years ago
Slávek Banko 3fe62c86d7
Update TDEL10n module
6 years ago
Slávek Banko a1f8f47c4f
Update TDEL10n module
6 years ago
Slávek Banko 4996c55460
Update TDEL10n module
6 years ago
Slávek Banko 5b16af7c3c
Update TDEL10n module
6 years ago
Slávek Banko 60591118be
Update TDEL10n module
6 years ago
Slávek Banko cd660ceb3e
Update TDEL10n module
6 years ago
Slávek Banko 097456ec3f
Update TDEL10n module
6 years ago
Slávek Banko 156cc08683
Update TDEL10n module
6 years ago
Slávek Banko 6d3c68b4c0
Update TDEL10n module
6 years ago
Slávek Banko 98ab4f915b
Update TDEL10n module
6 years ago
Slávek Banko 8349b4a317
Update TDEL10n module
6 years ago
Slávek Banko 3cfc9620c8
Update TDEL10n module
6 years ago
Slávek Banko 62b2ca73df
Update TDEL10n module
6 years ago
Slávek Banko e3dad84ecf
Update TDEL10n module
6 years ago
Slávek Banko 2c5d5794cc
Update TDEL10n module
6 years ago
Slávek Banko cc3cab06b7
Update TDEL10n module
6 years ago
Slávek Banko 9cad1a7d43
Update TDEL10n module
6 years ago
Slávek Banko 5e93c9bb7c
Update TDEL10n module
6 years ago
Slávek Banko 828d242728
Update TDEL10n module
6 years ago
Slávek Banko e5b09dcf46
Update TDEL10n module
6 years ago
Slávek Banko 23d320a5d7
Update TDEL10n module
6 years ago
Slávek Banko ef3050859d
Update TDEL10n module
6 years ago
Slávek Banko bb13efcd1a
Update TDEL10n module
6 years ago
Slávek Banko 5011a297f3
Fix small typing errors in the tde_create_translation macro.
6 years ago
Slávek Banko ed0d46cb47
Use POSITION_INDEPENDENT_CODE property for CMake >= 2.8.9.
6 years ago
Slávek Banko 529bdf2f48
Add TDEL10n module
6 years ago
Slávek Banko 2e6daa80e2 Add support for libraries with release number in the name of the library
7 years ago
Slávek Banko f5ec55650b Fix '.la' file name for libraries with dot in name
7 years ago
Slávek Banko 7eed3aa726 Automatically run tests within check target
7 years ago
Alexander Golubev 0d13cc2b5a tde_add_check_executable: add TEST argument
8 years ago
Alexander Golubev 094407b3b9 add tde_add_check_executable macro
8 years ago
Slávek Banko d4e69bf65f Fix FTBFS when tdelibs was built without tdelfeditor
8 years ago
Slávek Banko 3bb71d2ebd Find tdelfeditor executable on the system paths
8 years ago
Slávek Banko 283bc113d9 Removed use of tdelfeditor on base 'so' file of versioned library
8 years ago
Slávek Banko 0df82ab817 Move last command processing 'ui' file from TDEMacros to tde_uic
8 years ago
Slávek Banko 04cc5a03d8 Fix CMP0054 warnings with CMake 3.1
9 years ago
Slávek Banko e708fab736 Fix CMP0011 warning related to CMP0026
9 years ago
Slávek Banko a4263ae0e1 Fix characters disallowed for target name in tde_create_translation
9 years ago

@ -0,0 +1,33 @@
#################################################
#
# (C) 2021 Slávek Banko
# slavek.banko (at) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
## Process only if it is built as a standalone package
if( "${CMAKE_CURRENT_SOURCE_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}" )
##### general package setup #####################
cmake_minimum_required( VERSION 3.1 )
project( tde-cmake-rules )
##### install TDE CMake files ###################
file( GLOB_RECURSE _modules
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/modules/* )
install( FILES ${_modules} DESTINATION ${CMAKE_ROOT}/Modules )
file( GLOB_RECURSE _templates
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/templates/* )
install( FILES ${_templates} DESTINATION ${CMAKE_ROOT}/Templates )
endif()

@ -28,6 +28,8 @@ if( NOT TDE_FOUND )
if( NOT KDECONFIG_EXECUTABLE )
tde_message_fatal( "tde-config are NOT found." )
endif( NOT KDECONFIG_EXECUTABLE )
set( KDECONFIG_EXECUTABLE ${KDECONFIG_EXECUTABLE}
CACHE INTERNAL "tde-config executable" )
endif( NOT DEFINED KDECONFIG_EXECUTABLE )
set( ENV{LD_LIBRARY_PATH} "${TDE_LIBDIR}:$ENV{LD_LIBRARY_PATH}" )
@ -41,7 +43,7 @@ if( NOT TDE_FOUND )
# parse tde-config output, to extract TDE version
string( REGEX MATCH "TDE: R([0-9\\.]+).*" __dummy "${_version}" )
set( TDE_VERSION "${CMAKE_MATCH_1}" )
set( TDE_VERSION "${CMAKE_MATCH_1}" CACHE INTERNAL "" )
# ask tde-config for few paths
macro( __internal_get_path __type __var )
@ -68,7 +70,7 @@ if( NOT TDE_FOUND )
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT ${__var} )
tde_message_fatal( "${__prog} are NOT found.\n TDELIBS are correctly installed?" )
tde_message_fatal( "${__prog} is NOT found.\n TDELIBS are correctly installed?" )
endif( NOT ${__var} )
set( ${__var} ${${__var}} CACHE INTERNAL "${__prog} executable" FORCE )
endmacro( __internal_find_program )
@ -79,6 +81,13 @@ if( NOT TDE_FOUND )
__internal_find_program( meinproc KDE3_MEINPROC_EXECUTABLE )
__internal_find_program( tdeconfig_compiler KDE3_KCFGC_EXECUTABLE )
__internal_find_program( maketdewidgets KDE3_MAKETDEWIDGETS_EXECUTABLE )
# Don't use __internal_find_program due to it's not mandatory
if( NOT DEFINED TDELFEDITOR_EXECUTABLE )
find_program( TDELFEDITOR_EXECUTABLE NAMES tdelfeditor
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR} OUTPUT_STRIP_TRAILING_WHITESPACE )
set( TDELFEDITOR_EXECUTABLE ${TDELFEDITOR_EXECUTABLE}
CACHE INTERNAL "tdelfeditor executable" )
endif( )
# dcopidlng is a bash script which using tde-config;
# if PATH to tde-config is not set, dcopidlng will fail;
@ -86,16 +95,13 @@ if( NOT TDE_FOUND )
set( KDE3_DCOPIDLNG_EXECUTABLE env KDECONFIG=${KDECONFIG_EXECUTABLE} ${KDE3_DCOPIDLNG_EXECUTABLE}
CACHE INTERNAL "dcopidlng executable" FORCE )
# look for SCM data if present
if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmmodule" TDE_SCM_MODULE_NAME )
endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmmodule" )
if( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
file( STRINGS "${CMAKE_SOURCE_DIR}/.tdescmrevision" TDE_SCM_MODULE_REVISION )
endif( EXISTS "${CMAKE_SOURCE_DIR}/.tdescmrevision" )
# read source metadata
tde_read_src_metadata()
message( STATUS " found 'TDE', version ${TDE_VERSION}" )
endif( NOT TDE_FOUND )
include( "${TDE_CMAKE_DIR}/tdelibs.cmake" )
if( NOT TARGET tdecore-shared )
include( "${TDE_CMAKE_DIR}/tdelibs.cmake" )
endif()

@ -13,83 +13,110 @@ macro( tqt_message )
message( STATUS "${ARGN}" )
endmacro( )
pkg_search_module( TQT tqt )
if( NOT TQT_FOUND )
tde_message_fatal( "Unable to find tqt!\n Try adding the directory in which the tqt.pc file is located\nto the PKG_CONFIG_PATH variable." )
endif( )
pkg_search_module( TQT tqt )
if( NOT TQT_FOUND )
tde_message_fatal( "Unable to find tqt!\n Try adding the directory in which the tqt.pc file is located\nto the PKG_CONFIG_PATH variable." )
endif( )
# tmoc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=tmoc_executable
OUTPUT_VARIABLE TMOC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE )
mark_as_advanced(
TMOC_EXECUTABLE
MOC_EXECUTABLE
UIC_EXECUTABLE
)
if( NOT EXISTS ${TMOC_EXECUTABLE} )
tde_message_fatal( "tmoc is not found!\n tqt is correctly installed?" )
endif( )
# tmoc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=tmoc_executable
OUTPUT_VARIABLE TMOC_EXECUTABLE
CACHE FILEPATH "TQt tmoc executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
tqt_message( " tmoc path: ${TMOC_EXECUTABLE}" )
if( NOT EXISTS ${TMOC_EXECUTABLE} )
tde_message_fatal( "tmoc is not found!\n tqt is correctly installed?" )
endif( )
tqt_message( " tmoc path: ${TMOC_EXECUTABLE}" )
# moc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=moc_executable
OUTPUT_VARIABLE MOC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${MOC_EXECUTABLE} )
tde_message_fatal( "Path to moc is not set.\n tqt is correctly installed?" )
endif( )
# moc_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=moc_executable
OUTPUT_VARIABLE MOC_EXECUTABLE
CACHE FILEPATH "TQt moc executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
tqt_message( " moc path: ${MOC_EXECUTABLE}" )
if( NOT EXISTS ${MOC_EXECUTABLE} )
tde_message_fatal( "Path to moc is not set.\n tqt is correctly installed?" )
endif( )
tqt_message( " moc path: ${MOC_EXECUTABLE}" )
# uic_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=uic_executable
OUTPUT_VARIABLE UIC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${UIC_EXECUTABLE} )
tde_message_fatal( "uic not found!\n tqt is correctly installed?" )
endif( )
# uic_executable
tde_execute_process(
COMMAND pkg-config tqt --variable=uic_executable
OUTPUT_VARIABLE UIC_EXECUTABLE
CACHE FILEPATH "TQt uic executable path"
OUTPUT_STRIP_TRAILING_WHITESPACE )
tqt_message( " uic path: ${UIC_EXECUTABLE}" )
if( NOT EXISTS ${UIC_EXECUTABLE} )
tde_message_fatal( "uic not found!\n tqt is correctly installed?" )
endif( )
tqt_message( " uic path: ${UIC_EXECUTABLE}" )
# tqt-replace script
set( TQT_REPLACE_SCRIPT "${TQT_PREFIX}/bin/tqt-replace" )
if( NOT EXISTS ${TQT_REPLACE_SCRIPT} )
tde_message_fatal( "tqt-replace not found!\n Check tqt installation." )
endif( )
# tqt-replace script
set( TQT_REPLACE_SCRIPT "${TQT_PREFIX}/bin/tqt-replace"
CACHE FILEPATH "TQt replace script path" )
tqt_message( " tqt-replace path: ${TQT_REPLACE_SCRIPT}" )
if( NOT EXISTS ${TQT_REPLACE_SCRIPT} )
tde_message_fatal( "tqt-replace not found!\n Check tqt installation." )
endif( )
tqt_message( " tqt-replace path: ${TQT_REPLACE_SCRIPT}" )
# check if tqt is usable
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} )
foreach( _dirs ${TQT_LIBRARY_DIRS} )
list( APPEND CMAKE_REQUIRED_LIBRARIES "-L${_dirs}" )
endforeach()
list( APPEND CMAKE_REQUIRED_LIBRARIES ${TQT_LIBRARIES} )
check_cxx_source_compiles("
# check if tqt is usable
tde_save( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
set( CMAKE_REQUIRED_INCLUDES ${TQT_INCLUDE_DIRS} )
foreach( _dirs ${TQT_LIBRARY_DIRS} )
list( APPEND CMAKE_REQUIRED_LIBRARIES "-L${_dirs}" )
endforeach()
list( APPEND CMAKE_REQUIRED_LIBRARIES ${TQT_LIBRARIES} )
check_cxx_source_compiles("
#include <tqapplication.h>
int main(int argc, char **argv) { TQApplication app(argc, argv); return 0; } "
HAVE_USABLE_TQT )
HAVE_USABLE_TQT )
if( NOT HAVE_USABLE_TQT )
tde_message_fatal( "Unable to build a simple tqt test." )
endif( )
if( NOT HAVE_USABLE_TQT )
tde_message_fatal( "Unable to build a simple tqt test." )
endif( )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
# TQT_CMAKE_DIR
if( NOT DEFINED TQT_CMAKE_DIR )
set( TQT_CMAKE_DIR "${TQT_LIBDIR}/cmake"
CACHE FILEPATH "Path for shared TQt CMake targets" )
endif()
# TQT_CXX_FLAGS
foreach( _flag ${TQT_CFLAGS} ${TQT_CFLAGS_OTHER} )
set( TQT_CXX_FLAGS "${TQT_CXX_FLAGS} ${_flag}" )
endforeach()
# TQT_CXX_FLAGS
foreach( _flag ${TQT_CFLAGS} ${TQT_CFLAGS_OTHER} )
set( TQT_CXX_FLAGS "${TQT_CXX_FLAGS} ${_flag}" )
endforeach()
set( TQT_CXX_FLAGS "${TQT_CXX_FLAGS}" CACHE INTERNAL "" )
endif( NOT TQT_FOUND )
# Set compiler flags according to build type
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG" )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-DNDEBUG" )
# Set the required minimum C++ standard
set( TDE_CXX_FEATURES cxx_nullptr )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -0,0 +1,32 @@
#################################################
#
# (C) 2022 Michele Calgaro
# michele (DOT) calgaro (AT) yahoo (DOT) it
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
#################################################
#####
##### tde_set_project_version
macro( tde_set_project_version )
set( DEFAULT_VERSION "R14.0.13~[DEVELOPMENT]" )
unset( VERSION )
if( EXISTS ${CMAKE_SOURCE_DIR}/.tdescminfo )
file( STRINGS ${CMAKE_SOURCE_DIR}/.tdescminfo VERSION_STRING REGEX "^Version:.+$" )
string( REGEX REPLACE "^Version: (R[0-9]+\.[0-9]+\.[0-9]+.*)$" "\\1" VERSION "${VERSION_STRING}" )
endif()
if( NOT VERSION )
set( VERSION "${DEFAULT_VERSION}" )
endif()
endmacro( )

@ -0,0 +1,76 @@
#################################################
#
# (C) 2022 Slávek Banko
# slavek (DOT) banko (AT) axis.cz
#
# Improvements and feedback are welcome
#
# This file is released under GPL >= 2
#
#################################################
if( NOT ${CMAKE_CURRENT_LIST_DIR} STREQUAL ${CMAKE_ROOT}/Modules )
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" )
endif()
include( TDEMacros )
get_filename_component( _src_file "${SRC_FILE}" ABSOLUTE )
set( _meta_includes ${META_INCLUES} )
unset( _moc_headers )
if( EXISTS "${_src_file}" )
# read source file and check if have moc include
file( READ "${_src_file}" _src_content )
string( REGEX MATCHALL "#include +[^ ]+\\.moc[\">]" _moc_includes "${_src_content}" )
# found included moc(s)?
if( _moc_includes )
foreach( _moc_file ${_moc_includes} )
# extracting moc filename
string( REGEX MATCH "[^ <\"]+\\.moc" _moc_file "${_moc_file}" )
set( _moc_file "${CMAKE_CURRENT_BINARY_DIR}/${_moc_file}" )
# create header filename
get_filename_component( _src_path "${_src_file}" ABSOLUTE )
get_filename_component( _src_path "${_src_path}" PATH )
get_filename_component( _src_header "${_moc_file}" NAME_WE )
set( _header_file "${_src_path}/${_src_header}.h" )
# if header doesn't exists, check in META_INCLUDES
if( NOT EXISTS "${_header_file}" )
unset( _found )
foreach( _src_path ${_meta_includes} )
set( _header_file "${_src_path}/${_src_header}.h" )
if( EXISTS "${_header_file}" )
set( _found 1 )
break( )
endif( )
endforeach( )
if( NOT _found )
get_filename_component( _moc_file "${_moc_file}" NAME )
tde_message_fatal( "AUTOMOC error: '${_moc_file}' cannot be generated.\n Reason: '${_src_header}.h' not found." )
endif( )
endif( )
# moc-ing header
execute_process( COMMAND ${TMOC_EXECUTABLE} ${_header_file} -o ${_moc_file} )
list( APPEND _moc_headers "${_src_header}.h" )
endforeach( _moc_file )
endif( _moc_includes )
else()
tde_message_fatal( "AUTOMOC error: '${_src_file}' not found!" )
endif( EXISTS "${_src_file}" )
get_filename_component( _automoc_file "${_src_file}+automoc" NAME )
if( DEFINED _moc_headers )
string( REPLACE ";" "\n * " _moc_headers "${_moc_headers}" )
file( WRITE "${_automoc_file}" "/*\n * processed:\n * ${_moc_headers}\n */" )
else()
file( WRITE "${_automoc_file}" "/* processed - no moc files */" )
endif()

File diff suppressed because it is too large Load Diff

@ -9,7 +9,9 @@
#
#################################################
set( CMAKE_MODULE_PATH "${MASTER_SOURCE_DIR}/cmake/modules" )
if( NOT ${CMAKE_CURRENT_LIST_DIR} STREQUAL ${CMAKE_ROOT}/Modules )
set( CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}" )
endif()
include( TDEMacros )
get_filename_component( _ui_basename ${UI_FILE} NAME_WE )
@ -29,8 +31,16 @@ if( TDE_QTPLUGINS_DIR )
set( L -L ${TDE_QTPLUGINS_DIR} )
endif( )
# Choose translation function, different for TQt and TDE
if ( TDE_FOUND AND NOT TQT_ONLY )
set( TR_FUNC "tr2i18n" )
else( TDE_FOUND AND NOT TQT_ONLY )
set( TR_FUNC "tr" )
endif( TDE_FOUND AND NOT TQT_ONLY )
# Generate ui .h file
tde_execute_process( COMMAND ${UIC_EXECUTABLE}
-nounload -tr tr2i18n
-nounload -tr ${TR_FUNC}
${L}
${local_ui_file}
OUTPUT_VARIABLE _ui_h_content )
@ -38,24 +48,35 @@ tde_execute_process( COMMAND ${UIC_EXECUTABLE}
if( _ui_h_content )
string( REGEX REPLACE "#ifndef " "#ifndef UI_" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#define " "#define UI_" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "public TQWizard" "public KWizard" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "public QWizard" "public KWizard" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#include <ntqwizard.h>" "#include <kwizard.h>" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#include <qwizard.h>" "#include <kwizard.h>" _ui_h_content "${_ui_h_content}" )
if ( TDE_FOUND AND NOT TQT_ONLY )
string( REGEX REPLACE "public TQWizard" "public KWizard" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "public QWizard" "public KWizard" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#include <ntqwizard.h>" "#include <kwizard.h>" _ui_h_content "${_ui_h_content}" )
string( REGEX REPLACE "#include <qwizard.h>" "#include <kwizard.h>" _ui_h_content "${_ui_h_content}" )
endif( TDE_FOUND AND NOT TQT_ONLY )
file( WRITE ${_ui_basename}.h "${_ui_h_content}" )
endif( )
# Generate ui .cpp file
tde_execute_process( COMMAND ${UIC_EXECUTABLE}
-nounload -tr tr2i18n
-nounload -tr ${TR_FUNC}
${L}
-impl ${_ui_basename}.h
${local_ui_file}
OUTPUT_VARIABLE _ui_cpp_content )
if( _ui_cpp_content )
string( REGEX REPLACE "tr2i18n\\(\"\"\\)" "QString::null" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE "tr2i18n\\(\"\", \"\"\\)" "QString::null" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE ": TQWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE ": QWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
file( WRITE ${_ui_basename}.cpp "#include <kdialog.h>\n#include <tdelocale.h>\n\n${_ui_cpp_content}" )
endif( )
string( REGEX REPLACE "${TR_FUNC}\\(\"\"\\)" "TQString::null" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE "${TR_FUNC}\\(\"\", \"\"\\)" "TQString::null" _ui_cpp_content "${_ui_cpp_content}" )
if ( TDE_FOUND AND NOT TQT_ONLY )
string( REGEX REPLACE ": TQWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
string( REGEX REPLACE ": QWizard\\(" ": KWizard(" _ui_cpp_content "${_ui_cpp_content}" )
set( _ui_cpp_content "#include <kdialog.h>\n#include <tdelocale.h>\n\n${_ui_cpp_content}" )
endif( TDE_FOUND AND NOT TQT_ONLY )
file( WRITE ${_ui_basename}.cpp "${_ui_cpp_content}" )
tde_execute_process( COMMAND ${MOC_EXECUTABLE}
${_ui_basename}.h
OUTPUT_VARIABLE _ui_h_moc_content )
file( APPEND ${_ui_basename}.cpp "${_ui_h_moc_content}" )
endif( _ui_cpp_content )

@ -1,6 +1,7 @@
add_library( @_target@ @_type@ IMPORTED )
set_target_properties( @_target@ PROPERTIES
INTERFACE_COMPILE_FEATURES "@_cxx_features@"
IMPORTED_LINK_INTERFACE_LIBRARIES "@_shared_libs@"
IMPORTED_LOCATION "@_location@"
IMPORTED_SONAME "@_soname@" )
Loading…
Cancel
Save