summaryrefslogtreecommitdiffstats
path: root/Modules/Qt4Macros.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Use string(APPEND) in ModulesDaniel Pfeifer2016-07-271-2/+2
| | | | | | | Automate with: find Modules -type f -print0 | xargs -0 perl -i -0pe \ 's/set\(([a-zA-Z0-9_]+)(\s+)"\$\{\1\}([^"])/string(APPEND \1\2"\3/g'
* Modules: Check for ARGC before using ARGV#Daniele E. Domenichelli2015-02-271-3/+9
| | | | ARGV# could be defined from a parent scope.
* Qt4: Fix configure_file call to use COPYONLY, not COPY_ONLYBrad King2014-10-311-1/+1
|
* Qt4: write moc parameter file only when content has changedPeter Kümmel2014-04-251-1/+3
|
* Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)Rolf Eike Beer2014-04-141-2/+2
| | | | | | The matches have already been calculated and can simply be taken from CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very similar regular expressions.
* Merge topic 'Qt4Macros-moc-performance'Brad King2014-04-041-2/+2
|\ | | | | | | | | 7beba986 Qt4Macros: Make QT4_CREATE_MOC_COMMAND a function
| * Qt4Macros: Make QT4_CREATE_MOC_COMMAND a functionRobert Maynard2014-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QT4_CREATE_MOC_COMMAND is given a moc_flags argument that contains the COMPILE_DEFINITIONS and a potentially large list of include directories. Since it is a macro, the ${moc_flags} reference is replaced with this content and sent through cmMakefile::ExpandVariablesInString (EVIS). Since commit v3.0.0-rc1~138^2 (Qt4: Use generator expression in COMPILE_DEFINITIONS, 2014-01-13) the COMPILE_DEFINITIONS value contains a '$' so the EVIS fast-path is no longer used. Instead the full cmCommandArgumentParserHelper is now used on the large input, which is very slow (since it was originally created for hand-written code). Change QT4_CREATE_MOC_COMMAND to a function instead of a macro to avoid passing large content through EVIS. This makes it significantly faster.
* | Qt4: Fix moc command dependencies for incremental build.Stephen Kelly2014-03-211-1/+1
|/ | | | | | | | | | | | | Since commit v2.8.12~327^2 (Qt4Macros: Allow specifying a TARGET in invokations of macros., 2013-02-26), a parameters file is populated with moc arguments at generate-time. When the compile definitions or include directories change, the parameters file is updated but moc is not re-run in response. Fix that by making the moc invocation depend on the parameters file. Reported-At: https://bugreports.qt-project.org/browse/QTBUG-36970
* Qt4: Use correct qdbus executable in macro.Stephen Kelly2014-03-101-1/+1
| | | | | | Commit v3.0.0-rc1~71^2~9 (Qt4: Use IMPORTED executable names with custom commands., 2014-01-24) erroneusly changed this command to use the wrong target.
* Qt4: Use IMPORTED executable names with custom commands.Stephen Kelly2014-01-281-9/+9
| | | | | | Finding Qt 5 can overwrite the QT_MOC_EXECUTABLE variable with the moc from Qt 5. Use the IMPORTED target with the explicit version in the name to avoid that.
* Use a config-specific moc parameters file, if needed.Stephen Kelly2013-12-121-0/+1
|
* Qt4: make pro files generated for translations easier to readRolf Eike Beer2013-10-161-3/+4
| | | | | -use one line for each input file and include directory -remove duplicate include directories
* Convert builtin help to reStructuredText source filesKitware Robot2013-10-151-0/+6
| | | | | | | | Run the convert-help.bash script to convert documentation: ./convert-help.bash "/path/to/CMake-build/bin" Then remove it.
* Qt4Macros: Port to use message(DEPRECATION)Stephen Kelly2013-10-081-18/+2
|
* Qt4Macros: Simplify some variable population.Stephen Kelly2013-07-261-4/+2
|
* Qt4Macros: Remove undefined varible use.Stephen Kelly2013-07-261-1/+1
| | | | | This may have been added in anticipation of processing COMPILE_OPTIONS, but as moc does not accept them, there is no need for it.
* Qt4Macros: Remove unneeded generate CONDITION.Stephen Kelly2013-07-261-1/+0
|
* Mark qt4_use_modules and qt4_automoc as obsolete.Stephen Kelly2013-07-141-0/+22
| | | | | The QT_QMAKE_EXECUTABLE has to be passed through the cmake calls because the executable may not be in the PATH.
* Merge topic 'qt4-macros-TARGET-arg'Brad King2013-06-041-38/+62
|\ | | | | | | | | 9ce60ff Qt4Macros: Allow specifying a TARGET in invokations of macros.
| * Qt4Macros: Allow specifying a TARGET in invokations of macros.Stephen Kelly2013-06-031-38/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That will allow things like this: find_package(Qt4) qt4_generate_moc(myfile.h moc_myfile.cpp TARGET foo) # Note, foo target doesn't # exist until below. add_library(foo ...) The qt4_generate_moc call would use the INCLUDE_DIRECTORIES from the foo target using generator expressions. Currently it reads the INCLUDE_DIRECTORIES directory property, meaning that include_directories() is required. Support for the TARGET is also added to qt4_wrap_cpp, but not qt4_automoc, as that is deprecated in favor of the AUTOMOC target property. The moc tool reports failure if the Q_INTERFACES macro is used with an argument which has not appeared with Q_DECLARE_INTERFACE, so that is the basis of the unit test. The command line arguments are now always written to a file, which is passed to moc as the @atfile. This was already the case on Windows, but now it is used everywhere. The reason for that is that it is not currently possible to expand the list of includes from a target directly in a add_custom_command invokation (though that may become possible in the future). There is not a big disadvantage to using the file anyway on unix, so having one code path instead of two is also a motivation.
* | Qt4Macros: Handle Qt ActiveX libraries in qt4_use_modules.Stephen Kelly2013-06-031-8/+16
|/ | | | These libraries have non-conventional variable names.
* Merge topic 'Qt4Macros-fix-resource-parsing'David Cole2012-09-041-1/+1
|\ | | | | | | | | 42bfc5a Read entire Qt4 qrc file when parsing for depends info.
| * Read entire Qt4 qrc file when parsing for depends info.Stephen Kelly2012-08-301-1/+1
| | | | | | | | | | The qrc file is an xml file, not line based, so the entire 'interesting' content to parse is not necessarily found by STRINGS and a regexp.
* | Merge topic 'Qt4Macros-fix-resource-parsing'Brad King2012-08-231-3/+5
|\ \ | |/ | | | | | | 3553001 Qt4Macros: Fix recently broken resource file parsing
| * Qt4Macros: Fix recently broken resource file parsingBrad King2012-08-221-3/+5
| | | | | | | | | | | | | | | | | | | | | | Commit 4be67837 (read less from version headers into variables, 2012-08-19) switched from file(READ) and string(REGEX MATCHALL) to just file(STRINGS) to extract the list of resource <file> entries. However, the latter extracts entire lines that match the regex, not just the part that matches the regex, so the subsequent string(REGEX REPLACE) fails to match and replace anything. Return to the original parsing logic but replace file(READ) with file(STRINGS) to load a minimal part of the file before using string(REGEX MATCHALL) as before.
* | Merge topic 'qt4_use_modules'David Cole2012-08-201-0/+21
|\ \ | |/ |/| | | | | 1420691 Add new qt4_use_modules function.
| * Add new qt4_use_modules function.Stephen Kelly2012-08-191-0/+21
| |
* | read less from version headers into variablesRolf Eike Beer2012-08-191-4/+4
|/ | | | | | | | | Instead of reading the whole file using file(READ) and later matching on the whole file use file(STRINGS ... REGEX) to get only those lines we are interested in at all. This will make the list much smaller (good for debugging) and also the regular expressions will need to match on much smaller strings. Also unset the content variables once they are not used anymore.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-70/+70
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-271/+271
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-4/+4
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Qt4Macros: add some quotes to prevent damage from spaces in the pathsRolf Eike Beer2012-06-201-17/+17
|
* Qt4Macros: improve basename extraction in QT4_ADD_DBUS_INTERFACESRolf Eike Beer2012-06-201-1/+2
| | | | | | -convert the filename to lowercase before the extraction, this allows this to work even if the filename as uppercase ".XML" extension -use get_filename_component(... NAME) to strip the path
* Qt4Macros: Added support for generated resource filesTobias Bieniek2012-05-291-16/+24
| | | | | | | | | | Using the QT4_ADD_RESOURCES() macro required the resource file to exist already for dependency scanning. This prevented the use of resource files that are generated by cmake because it needs the file before resolving the dependency. This patch adds support for generated resource files by not scanning the resource file for dependencies if it doesn't exist yet. The add_custom_command() to generate the resource file should add the dependencies on the files used by the resource file.
* FindQt4: Add include directories for lupdate.Clinton Stimpson2012-02-091-1/+7
| | | | | Fixes bug #12644. Thanks Bernd Lörwald for partial patch.
* Fix path quoting in Qt4 macrosPierre-Francois Laquerre2011-12-041-9/+9
| | | | | | | | Adding VERBATIM to the ADD_CUSTOM_COMMAND calls in the qt4 macros ensures that paths are properly quoted when passed to the shell. This fixes issues when building projects that contained paths with special characters (according to /bin/sh), such as parentheses or spaces.
* Add features from KDE for arguments to qdbusxml2cpp.Stephen Kelly2011-09-051-3/+16
|
* Speed up creation of parameters file for moc custom command.Clinton Stimpson2011-03-101-4/+2
| | | | Thanks A. Saratow for patch.
* allow absolute paths for dbus interface.Clinton Stimpson2010-12-231-1/+9
|
* Merge topic 'moc-includes-regex'David Cole2010-11-231-4/+4
|\ | | | | | | | | 35b91ac Fix regex for moc includes when looking for frameworks.
| * Fix regex for moc includes when looking for frameworks.Clinton Stimpson2010-08-021-4/+4
| |
* | Force cmake to run again when qrc dependency scanning needs to happen.Clinton Stimpson2010-10-151-1/+6
| |
* | Make sure moc parameters file goes in binary directory.Clinton Stimpson2010-08-241-4/+7
| | | | | | | | | | | | Fix bug 11120. Parameters files previously went into source directory when qt4_generate_moc() was given relative paths. Also simplified some logic for absolute paths.
* | Modules: Fix spelling 'To distributed' -> 'To distribute'Todd Gamblin2010-08-091-1/+1
|/
* Revert "Include relative path in generated qrc and uic files. Fixes #10413."Clinton Stimpson2010-04-081-2/+2
| | | | This reverts commit 108090fde96916ba666f035d1e260f036af5b31e.
* Include relative path in generated qrc and uic files. Fixes #10413.Clinton Stimpson2010-03-171-2/+2
|
* Split some logic of FindQt4.cmake into separate files, which are included ↵Alexander Neundorf2009-11-151-0/+399
automatically. Qt4Macros.cmake: all the "public" macros of FindQt4.cmake Qt4ConfigDependentSettings.cmake: the code for detecting the Qt-configuration dependent additional libraries, e.g. when linking statically. There should be no functional changes in this patch. The patch reduces the length of FindQt4.cmake from 1700 lines to around 1000 lines, which is still long enough, but this should make the file a easier to handle (and it is similar to what we do in KDE with FindKDE4Internal.cmake and KDE4Macros.cmake) Ok by Clinton. Alex