Compare commits

...

151 Commits

Author SHA1 Message Date
Michele Calgaro 2a496fc80d
Make sure to check for existance of ${CMAKE_SOURCE_DIR}/.tdescminfo
2 years ago
Michele Calgaro 088f3e3bdc
Add macro to set project version at TDE-wide scope.
2 years ago
Slávek Banko 0321845582
tde_automoc: Add support for processing automoc for generated files.
2 years ago
Slávek Banko 2062d69338
Add TQT_CMAKE_DIR variable.
2 years ago
Slávek Banko 41d6726c09
tde_install_export: Sort individual exported files before generating
2 years ago
Slávek Banko 4997597603
Add the ability to specify the necessary CXX features in tde_add_check_executable.
2 years ago
Slávek Banko e42c55b006
Raise the minimum required version of CMake to 3.1.
3 years ago
Slávek Banko 8fc3c9fbb3
tde_create_handbook: Fix characters not permitted for target name.
3 years ago
Slávek Banko cb20ae4039
Add the ability to specify the necessary CXX features.
3 years ago
Slávek Banko aafc7636e1
tde_create_handbook: Add *.gif files to automatically installed.
3 years ago
Slávek Banko 7c0f67a85e
CMakeL10n: Prevent exclusion _translatorinfo when using X-POT.
3 years ago
Slávek Banko 31fb6b688e
CMakeL10n: Fix the path for loading additional POT files.
3 years ago
Slávek Banko 523b7a374b
CMakeL10n: Avoid option --use-first for msguniq call
3 years ago
Slávek Banko 0ac3858498
tde_create_translated_desktop: Add the ability to merge translations into files in XML format.
3 years ago
Slávek Banko f723653f70
CMakeL10n: Allow to use more than one X-POT files.
3 years ago
Slávek Banko af93e6c049
tde_create_handbook: Add *.jpg files to automatically installed.
3 years ago
Ray-V 2abe77fa97
Update tde_add_project_* macros:
3 years ago
Slávek Banko be1151c95f
tde_add_project_translations: Add common rules for generating and installing project translations.
3 years ago
Slávek Banko e2dff490ab
tde_add_project_docs: Add common rules for generating and installing project documentation.
3 years ago
Slávek Banko 8974c265ae
tde_create_translated_desktop: Fix characters not permitted for target name.
3 years ago
Slávek Banko aa076f143e
tde_uic: Set CMAKE_MODULE_PATH only if it is needed. This prevents CMP0017.
3 years ago
Slávek Banko 18a7c311d8
tde_add_ui_files: Use TDE_CMAKE_MODULES to determine the path for tde_uic.cmake.
3 years ago
Slávek Banko bfac26b355
Add CMake rules for installation as a standalone package.
3 years ago
Alexander Golubev e5cb6a51b3
tde_create_translated_desktop: Prevent FTBFS on generated desktop files
3 years ago
Slávek Banko dae53703f0
tde_create_translated_desktop: Prevent FTBFS if the length
3 years ago
Slávek Banko bbd9b65f26
tde_create_translated_desktop: Instead of preprocessing the desktop
3 years ago
Slávek Banko 068abb7105
tde_create_translated_desktop: Avoid confusing paths when processing
3 years ago
Slávek Banko 3c690a3519
tde_create_translated_desktop: Use find_file instead of find_program
3 years ago
Slávek Banko 1dd89cc65f
tde_create_translated_desktop: Incorporate a slightly modified version
3 years ago
Slávek Banko b3bb457668
tde_curdatetime: Add the -u option to call 'date'
3 years ago
Slávek Banko fa2f9f6148
Set compiler flags useful for reproducible building.
3 years ago
Slávek Banko c8ee49a69d
tde_create_tarball: Add options to make tarballs reproducible
4 years ago
Slávek Banko 542f905406
tde_create_translated_desktop: Show the full path of the source
4 years ago
Slávek Banko 1d96fed98e
Adjust CMakeL10n module to search for tde.pot in 'core/tdelibs' folder.
4 years ago
Michele Calgaro 63a625f7c6
Added search for additional files to tde_l10n_create_template.
4 years ago
Slávek Banko adf1b92de6
Add a global option to force colored output from compiler.
4 years ago
Slávek Banko 88b18c3ddd
tde_create_tarball: SOURCEDIR can be specified as relative.
4 years ago
Slávek Banko 641dd35df1
tde_create_translated_desktop: Allow generating a translated desktop
4 years ago
Slávek Banko 70dcc78db7
tde_create_translated_desktop: Fix CMP0054 warning in case of special
4 years ago
Slávek Banko 2bc11484ac
tde_create_translated_desktop: Fix processing when using configure_file.
4 years ago
Slávek Banko 25375aaa87
tde_create_translated_desktop: Add the ability to process multiple source
4 years ago
Slávek Banko 0368210118
tde_create_translated_desktop: PO_DIR can be specified as relative.
4 years ago
Slávek Banko 6d10436e93
tde_create_translated_desktop: Process the source file using configure_file
4 years ago
Slávek Banko 4e1b7e8582
tde_create_translated_desktop: Add the ability to call for the same source
4 years ago
aneejit1 73642d750e
Remove use of LINGUAS file to prevent writes to the source directory
4 years ago
Slávek Banko 2d05740cf0
Remove adding dependencies that were previously needed
4 years ago
Slávek Banko b9e9b4cbac
Fix FTBS if CMAKE_BUILD_TYPE is not set.
4 years ago
Slávek Banko 587796341b
Set the LINK_INTERFACE_LIBRARIES and INTERFACE_LINK_LIBRARIES
4 years ago
Slávek Banko fd16e820bf
tde_add_library: Add the ability to link libraries as private.
4 years ago
Slávek Banko e28a7be8ab
Move templates to a separate directory and rename to the tde_ prefix.
4 years ago
Slávek Banko aa52709a28
tde_create_translated_desktop: For working files in a binary directory,
4 years ago
Slávek Banko b3a51ff373
Update TDEL10n module
4 years ago
Slávek Banko 5d7886e19b
tde_create_dcop_kidl: Use dcopildng as the default instead of dcopidl.
4 years ago
Slávek Banko 857d5da6c5
Update TDEL10n module
4 years ago
Slávek Banko 954af801d5
FindTDE: Conditional import of exported tdelibs targets.
4 years ago
Slávek Banko e3088bed3c
tde_create_handbook: Add an optional SOURCE_BASEDIR argument.
4 years ago
Slávek Banko b303fed508
tde_create_translated_desktop: Use output name only during installation.
4 years ago
Slávek Banko 2756f9fab6
tde_create_translated_desktop: Force the use of intltool-merge.
4 years ago
Slávek Banko 98b2d6cbdc
Update TDEL10n module
4 years ago
Slávek Banko d9fc349162
Add caching of variables from checks results and add conditions
4 years ago
Slávek Banko dfbf5fa376
Update TDEL10n module
4 years ago
Slávek Banko 9ca5274ccb
Replace the remaining KDE3 macros.
4 years ago
Slávek Banko cc6a5a29b4
tde_create_translated_desktop: Allow spaces around the equal sign.
4 years ago
Slávek Banko 472254305d
tde_create_handbook: Improve build message.
4 years ago
Slávek Banko 9c9c7f29db
Create symlink for base soname for libraries with release number in the name
4 years ago
Slávek Banko 3a661f4737
Avoid storing "_version-NOTFOUND" in ELF metadata.
4 years ago
Slávek Banko fc3b20eb18
tde_read_src_metadata: Typo correction.
4 years ago
Slávek Banko dbef499b21
tde_create_translated_desktop: Use full name for target.
4 years ago
Slávek Banko ada3f01f8d
tde_create_translated_desktop: Cleaning the LINGUAS file
4 years ago
Slávek Banko 8e691f890e
tde_create_tarball: Add options to ensure reproducibility.
4 years ago
Slávek Banko 3d90cd2d6e
Update TDEL10n module
4 years ago
Slávek Banko 6884ec954f
Update TDEL10n module
4 years ago
Slávek Banko 0d52d83696
Add support for creation of translated desktop files during build.
4 years ago
Slávek Banko a86292d71a
Update TDEL10n module
4 years ago
Slávek Banko c838406b19
Use the source package date or the source git repository date
4 years ago
Slávek Banko 70ee060ff7
Add support for embedding libraries when building on SunOS.
4 years ago
Slávek Banko 5f81a57938
Remove -fvisibility-inlines-hidden from CMAKE_C_FLAGS
5 years ago
Slávek Banko 26ef5dbcaf
Update TDEL10n module
5 years ago
Slávek Banko d5ad455414
Use cache for TQt executables paths.
5 years ago
Slávek Banko 121d2a0e72
Update tde_add_check_executable macro
5 years ago
Slávek Banko 754594e16e
Fix installation of base soname for libraries with release number in the name.
5 years ago
Slávek Banko 7d465f8f02
Add a function that determines the filename of the library
5 years ago
Slávek Banko 84071b3095
Update tde_setup_gcc_visibility macro
5 years ago
Slávek Banko c07c746718
Update tde_setup_dbus macro
5 years ago
Slávek Banko 310fec7a51
Add tde_setup_dbus macro.
5 years ago
Slávek Banko 28fed6ab1a
Add tde_setup_largefiles macro.
5 years ago
Slávek Banko 41ea631198
Use tde_setup_msgfmt in tde_create_translation if needed.
5 years ago
Slávek Banko 2eca8d0a10
Add tde_setup_msgfmt macro.
5 years ago
Slávek Banko 14520c762c
Add tde_setup_gcc_visibility macro.
5 years ago
Slávek Banko 05ed76c79d
Update TDEL10n module
5 years ago
Slávek Banko f43bab5f15
Update tde_create_tarball macro
5 years ago
Slávek Banko d3232e0c86
Fix tde_create_tarball macro
5 years ago
Slávek Banko 34a74a33cf
Update TDEL10n module
6 years ago
Slávek Banko b18d54755e
Add tde_create_tarball macro.
6 years ago
Slávek Banko 7d2860cb2e
Update TDEL10n module
6 years ago
Slávek Banko e121001521
Update TDEL10n module
6 years ago
Slávek Banko 69a0ed7650
Update TDEL10n module
6 years ago
Slávek Banko 29fdccdcce
Update TDEL10n module
6 years ago
Slávek Banko ed88719165
Update TDEL10n module
6 years ago
Slávek Banko ffaf4158ee
Update TDEL10n module
6 years ago
Slávek Banko 3033d2ea6c
Update TDEL10n module
6 years ago
Slávek Banko e40c906d8d
Update TDEL10n module
6 years ago
Slávek Banko f64ebd66b2
Update TDEL10n module
6 years ago
Slávek Banko d82df9b4aa
Update TDEL10n module
6 years ago
Slávek Banko c75477b140
Update TDEL10n module
6 years ago
Slávek Banko a9b1931dd9
Update TDEL10n module
6 years ago
Slávek Banko 9a134320d2
Update TDEL10n module
6 years ago
Slávek Banko 1db4baf7c7
Update TDEL10n module
6 years ago
Slávek Banko c741b657de
Update TDEL10n module
6 years ago
Slávek Banko a186501a01
Update TDEL10n module
6 years ago
Slávek Banko c93a739f84
Update TDEL10n module
6 years ago
Slávek Banko 8ac1e793e6
Update TDEL10n module
6 years ago
Slávek Banko 2ac5fbc336
Update TDEL10n module
6 years ago
Slávek Banko ffce0e991c
Update TDEL10n module
6 years ago
Slávek Banko e604c976f3
Update TDEL10n module
6 years ago
Slávek Banko 1c9dd8b764
Update TDEL10n module
6 years ago
Slávek Banko 95a678ca9e
Update TDEL10n module
6 years ago
Slávek Banko de28678da9
Update TDEL10n module
6 years ago
Slávek Banko 9141292694
Update TDEL10n module
6 years ago
Slávek Banko 074d739874
Fix small typing errors in the tde_create_translation macro.
6 years ago
Slávek Banko e79fbb87de
Use POSITION_INDEPENDENT_CODE property for CMake >= 2.8.9.
6 years ago
Slávek Banko 226b8dfd43
Add TDEL10n module
6 years ago
Slávek Banko e1bba2385e Add support for libraries with release number in the name of the library
7 years ago
Slávek Banko 40c1d8a29f Fix '.la' file name for libraries with dot in name
7 years ago
Slávek Banko db500f99a7 Automatically run tests within check target
7 years ago
Alexander Golubev 766aeaca3d tde_add_check_executable: add TEST argument
7 years ago
Alexander Golubev da82a62cce add tde_add_check_executable macro
7 years ago
Slávek Banko be70c354ca Move last command processing 'ui' file from TDEMacros to tde_uic
7 years ago
Slávek Banko 5d19f23805 Fix CMP0054 warnings with CMake 3.1
9 years ago
Slávek Banko 558024e7a4 Fix CMP0011 warning related to CMP0026
9 years ago
Slávek Banko 637a4afb8f Fix characters disallowed for target name in tde_create_translation
9 years ago
Timothy Pearson f302fb7dd0 Bring package_development, package_games, package_graphics, package_network, package_multimedia, package_wordprocessing, edu_science, package_utilities, input_devices_settings, kcmsystem, personal, and looknfeel icons into XDG compliance
9 years ago
Slávek Banko 95cb8347ab Fix FTBFS if PIE is not supported
9 years ago
Slávek Banko 7c79da6333 Build setuid binaries with PIE flags
9 years ago
Slávek Banko fd91f2b33b Silence warnings on CMP0026 with CMake 3.x
9 years ago
Francois Andriot 79c3ffe27c Fix openbsd library naming convention
9 years ago
Slávek Banko 140fcae0cb Fix build with cmake >= 2.8.12
9 years ago
Alexander Golubev f01566744b Fix FTBFS with clang
9 years ago
Alexander Golubev ac7158646a Add support for all-in-one-dir structure in tde_create_translation
9 years ago
Slávek Banko 9773bff74a Add compiler flags according to build type
12 years ago
Francois Andriot ff0a87b2f0 Fix 'tde_create_handbook' macro if TDE_HTML_DIR is not set
12 years ago
Timothy Pearson 43cf593839 Second patch for covariant return type check
12 years ago
Slávek Banko 275361a6da Fix icon name parsing in tde_install_icons
12 years ago
Timothy Pearson b1f7924c05 Add support for tqt.pc
12 years ago
Timothy Pearson ffd67b8b1c Added CACHE option to tde_execute_process and clean up build output
12 years ago
Timothy Pearson 6c4bd81a29 Fix vague build errors due to blind execution in CMake
12 years ago
Slávek Banko 0a85319a35 Do not create symlink "common" in tde_createte_handbook with NOINDEX flag
12 years ago
Timothy Pearson f93811ed00 Install mng icons as well as png and svg icons
12 years ago
Serghei Amelian 25ca6f7a38 [TDEMacros.cmake] added tde_save_and_set() macro
12 years ago
Darrell Anderson 43ef41ffd6 Update final HTML install path so all modules are consistent.
12 years ago
Timothy Pearson 8552bcafcd Add new tde_setup_architecture_flags macro
12 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()

@ -13,36 +13,44 @@ if( NOT TDE_FOUND )
message( STATUS "checking for 'TDE'")
pkg_search_module( TDE tqt )
if( NOT TDE_FOUND )
tde_message_fatal( "Unable to find kdelibs!\n Try adding the directory in which the kdelibs.pc file is located\nto the PKG_CONFIG_PATH variable." )
endif( )
# if the path is not already defined by user,
# find kde-config executable
if( NOT DEFINED KDECONFIG_EXECUTABLE )
find_program( KDECONFIG_EXECUTABLE
NAMES kde-config
HINTS ${BIN_INSTALL_DIR} )
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR} )
if( NOT KDECONFIG_EXECUTABLE )
tde_message_fatal( "kde-config are NOT found." )
endif( NOT KDECONFIG_EXECUTABLE )
set( KDECONFIG_EXECUTABLE ${KDECONFIG_EXECUTABLE}
CACHE INTERNAL "kde-config executable" )
endif( NOT DEFINED KDECONFIG_EXECUTABLE )
set( ENV{LD_LIBRARY_PATH} "${TDE_LIBDIR}:$ENV{LD_LIBRARY_PATH}" )
# check for installed trinity version
execute_process(
tde_execute_process(
COMMAND ${KDECONFIG_EXECUTABLE} --version
OUTPUT_VARIABLE _version
RESULT_VARIABLE _result
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( _result )
tde_message_fatal( "Unable to run kde-config!\n KDELIBS are correctly installed?\n Path to kde-config are corect?" )
endif( _result )
OUTPUT_STRIP_TRAILING_WHITESPACE
MESSAGE "Unable to run kde-config!\n KDELIBS are correctly installed?\n Path to kde-config are corect?" )
# parse kde-config output, to extract TDE version
string( REGEX MATCH "KDE: ([0-9\\.]+)" __dummy "${_version}" )
set( TDE_VERSION "${CMAKE_MATCH_1}" )
string( REGEX MATCH "KDE: ([0-9\\.]+).*" __dummy "${_version}" )
set( TDE_VERSION "${CMAKE_MATCH_1}" CACHE INTERNAL "" )
# ask kde-config for few paths
macro( __internal_get_path __type __var )
execute_process(
tde_execute_process(
COMMAND ${KDECONFIG_EXECUTABLE} --expandvars --install ${__type}
OUTPUT_VARIABLE ${__var}
CACHE INTERNAL "TDE ${__type} path" FORCE
OUTPUT_STRIP_TRAILING_WHITESPACE )
endmacro( __internal_get_path )
@ -59,11 +67,12 @@ if( NOT TDE_FOUND )
macro( __internal_find_program __prog __var )
find_program( ${__var}
NAMES ${__prog}
HINTS ${TDE_BIN_INSTALL_DIR}
HINTS "${TDE_PREFIX}/bin" ${BIN_INSTALL_DIR}
OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT ${__var} )
tde_message_fatal( "${__prog} are NOT found.\n KDELIBS are correctly installed?" )
endif( NOT ${__var} )
set( ${__var} ${${__var}} CACHE INTERNAL "${__prog} executable" FORCE )
endmacro( __internal_find_program )
__internal_find_program( dcopidl KDE3_DCOPIDL_EXECUTABLE )
@ -77,10 +86,15 @@ if( NOT TDE_FOUND )
# if PATH to kde-config is not set, dcopidlng will fail;
# for this reason we set KDECONFIG environment variable before running dcopidlng
set( KDE3_DCOPIDLNG_EXECUTABLE env KDECONFIG=${KDECONFIG_EXECUTABLE} ${KDE3_DCOPIDLNG_EXECUTABLE}
CACHE INTERNAL KDE3_DCOPIDLNG_EXECUTABLE FORCE )
CACHE INTERNAL "dcopidlng executable" FORCE )
# read source metadata
tde_read_src_metadata()
message( STATUS " found 'TDE', version ${TDE_VERSION}" )
endif( NOT TDE_FOUND )
include( "${TDE_CMAKE_DIR}/kdelibs.cmake" )
if( NOT TARGET kdecore-shared )
include( "${TDE_CMAKE_DIR}/kdelibs.cmake" )
endif()

@ -13,69 +13,107 @@ 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( )
mark_as_advanced(
TMOC_EXECUTABLE
MOC_EXECUTABLE
UIC_EXECUTABLE
)
# 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 )
# tmoc_executable
execute_process(
COMMAND pkg-config tqt --variable=tmoc_executable
OUTPUT_VARIABLE TMOC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE )
if( NOT EXISTS ${TMOC_EXECUTABLE} )
tde_message_fatal( "tmoc is not found!\n tqt is correctly installed?" )
endif( )
if( TMOC_EXECUTABLE )
tqt_message( " tmoc path: ${TMOC_EXECUTABLE}" )
else( )
tde_message_fatal( "Path to tmoc is not set.\n tqt is correctly installed?" )
endif( )
# moc_executable
execute_process(
COMMAND pkg-config tqt --variable=moc_executable
OUTPUT_VARIABLE MOC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE )
# 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 )
if( NOT EXISTS ${MOC_EXECUTABLE} )
tde_message_fatal( "Path to moc is not set.\n tqt is correctly installed?" )
endif( )
if( MOC_EXECUTABLE )
tqt_message( " moc path: ${MOC_EXECUTABLE}" )
else( )
tde_message_fatal( "Path to moc is not set.\n tqt is correctly installed?" )
endif( )
# uic_executable
execute_process(
COMMAND pkg-config tqt --variable=uic_executable
OUTPUT_VARIABLE UIC_EXECUTABLE OUTPUT_STRIP_TRAILING_WHITESPACE )
# 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 )
if( NOT EXISTS ${UIC_EXECUTABLE} )
tde_message_fatal( "uic not found!\n tqt is correctly installed?" )
endif( )
if( UIC_EXECUTABLE )
tqt_message( " uic path: ${UIC_EXECUTABLE}" )
else( )
tde_message_fatal( "Path to uic is not set.\n tqt is correctly installed?" )
endif( )
# 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} )
# tqt-replace script
set( TQT_REPLACE_SCRIPT "${TQT_PREFIX}/bin/tqt-replace"
CACHE FILEPATH "TQt replace script path" )
if( NOT EXISTS ${TQT_REPLACE_SCRIPT} )
tde_message_fatal( "tqt-replace not found!\n Check tqt installation." )
endif( )
check_cxx_source_compiles("
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("
#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( )
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()
if( NOT HAVE_USABLE_TQT )
tde_message_fatal( "Unable to build a simple tqt test." )
endif( )
tde_restore( CMAKE_REQUIRED_INCLUDES CMAKE_REQUIRED_LIBRARIES )
# 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 )
# TQT_CXX_FLAGS
foreach( _flag ${TQT_CFLAGS_OTHER} )
set( TQT_CXX_FLAGS "${TQT_CXX_FLAGS} ${_flag}" )
endforeach()
# Set compiler flags according to build type
set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DNDEBUG" )
set( CMAKE_C_FLAGS_RELWITHDEBINFO "-DNDEBUG" )

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -35,13 +35,14 @@ macro( tde_setup_paths )
_tde_internal_setup_path( SBIN_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/sbin" "The install dir for system executables (default ${EXEC_INSTALL_PREFIX}/sbin)" )
_tde_internal_setup_path( LIB_INSTALL_DIR "${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}" "The subdirectory relative to the install prefix where libraries will be installed (default is ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX})" )
_tde_internal_setup_path( LIBEXEC_INSTALL_DIR "${LIB_INSTALL_DIR}/trinity/libexec" "The subdirectory relative to the install prefix where libraries will be installed (default is ${LIB_INSTALL_DIR}/trinity/libexec)" )
_tde_internal_setup_path( PKGCONFIG_INSTALL_DIR "${LIB_INSTALL_DIR}/pkgconfig" "The install dir for pkg-config metadata files" )
_tde_internal_setup_path( INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include" "The subdirectory to the header prefix" )
_tde_internal_setup_path( CMAKE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/cmake" "The install dir for cmake import modules" )
_tde_internal_setup_path( PLUGIN_INSTALL_DIR "${LIB_INSTALL_DIR}/trinity" "The subdirectory relative to the install prefix where plugins will be installed (default is ${LIB_INSTALL_DIR}/trinity)" )
_tde_internal_setup_path( CONFIG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config" "The config file install dir" )
_tde_internal_setup_path( DATA_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/apps" "The parent directory where applications can install their data" )
_tde_internal_setup_path( HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/kde/HTML" "The HTML install dir for documentation" )
_tde_internal_setup_path( HTML_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/doc/tde/HTML" "The HTML install dir for documentation" )
_tde_internal_setup_path( ICON_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/icons" "The icon install dir (default ${SHARE_INSTALL_PREFIX}/share/icons/)" )
_tde_internal_setup_path( KCFG_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/config.kcfg" "The install dir for kconfig files" )
_tde_internal_setup_path( LOCALE_INSTALL_DIR "${SHARE_INSTALL_PREFIX}/locale" "The install dir for translations" )

@ -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 "3.5.13.3~[DEVELOPMENT]" )
unset( VERSION )
if( EXISTS ${CMAKE_SOURCE_DIR}/.tdescminfo )
file( STRINGS ${CMAKE_SOURCE_DIR}/.tdescminfo VERSION_STRING REGEX "^Version:.+$" )
string( REGEX REPLACE "^Version: ([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,24 +9,29 @@
#
#################################################
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 )
# FIXME this will working only on out-of-source mode
set( local_ui_file ${_ui_basename}.ui )
configure_file( ${UI_FILE} ${local_ui_file} COPYONLY )
execute_process( COMMAND tqt-replace ${local_ui_file} )
tde_execute_process( COMMAND ${TQT_REPLACE_SCRIPT} ${local_ui_file} )
# ui.h extension file, if exists
if( EXISTS "${UI_FILE}.h" )
configure_file( ${UI_FILE}.h ${local_ui_file}.h COPYONLY )
execute_process( COMMAND tqt-replace ${local_ui_file}.h )
tde_execute_process( COMMAND ${TQT_REPLACE_SCRIPT} ${local_ui_file}.h )
endif( )
if( TDE_QTPLUGINS_DIR )
set( L -L ${TDE_QTPLUGINS_DIR} )
endif( )
execute_process( COMMAND ${UIC_EXECUTABLE}
tde_execute_process( COMMAND ${UIC_EXECUTABLE}
-nounload -tr tr2i18n
${L}
${local_ui_file}
@ -38,7 +43,7 @@ if( _ui_h_content )
file( WRITE ${_ui_basename}.h "${_ui_h_content}" )
endif( )
execute_process( COMMAND ${UIC_EXECUTABLE}
tde_execute_process( COMMAND ${UIC_EXECUTABLE}
-nounload -tr tr2i18n
${L}
-impl ${_ui_basename}.h
@ -49,4 +54,10 @@ 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}" )
file( WRITE ${_ui_basename}.cpp "#include <kdialog.h>\n#include <klocale.h>\n\n${_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( )

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