View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0014969CMakeModulespublic2014-06-11 22:212015-01-05 08:38
ReporterPulfer 
Assigned ToClinton Stimpson 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionno change required 
PlatformLinuxOSROSA Desktop FreshOS Version2014.1
Product VersionCMake 3.0 
Target VersionFixed in Version 
Summary0014969: Changes in FindQt4 resulted in "Qt4::lrelease: command not found"
Description$ cat CMakeLists.txt
...
file(GLOB tsfiles *.ts)
...
QT4_ADD_TRANSLATION(QM ${tsfiles})

--------------------------------------

[ 91%] Generating hedgewars_sk.qm
/bin/sh: Qt4::lrelease: command not found
make[2]: *** [share/hedgewars/Data/Locale/hedgewars_sk.qm] Error 127
make[1]: *** [share/hedgewars/Data/Locale/CMakeFiles/release-translation.dir/all] Error 2
make: *** [all] Error 2


--------------------------------------

$ grep lrelease * -r
CMakeCache.txt:QT_LRELEASE_EXECUTABLE:FILEPATH=/usr/lib/qt4/bin/lrelease
share/hedgewars/Data/Locale/CMakeFiles/release-translation.dir/build.make: cd /home/vuohi/rpmbuild/BUILD/hedgewars-src-0.9.20/build/share/hedgewars/Data/Locale && Qt4::lrelease /home/vuohi/rpmbuild/BUILD/hedgewars-src-0.9.20/share/hedgewars/Data/Locale/hedgewars_pt_BR.ts -qm /home/vuohi/rpmbuild/BUILD/hedgewars-src-0.9.20/build/share/hedgewars/Data/Locale/hedgewars_pt_BR.qm
...
Steps To ReproduceTry to build hedgewars 0.9.20.5 with cmake 3.0.
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0036167)
Clinton Stimpson (developer)
2014-06-12 09:52

This is a scope problem in the hedgewars CMakeLists.txt files.
The QT_LRELEASE_EXECUTABLE variable has global scope, and the Qt4::lrelease target does not.

Modifying it to do the following solves the problem.

find_package(Qt4)
QT4_ADD_TRANSLATION(QM ${tsfiles})
(0036210)
Pulfer (reporter)
2014-06-17 05:37

But is adding "find_package(Qt4)" solution or workaround?
(0036212)
Clinton Stimpson (developer)
2014-06-17 09:47

I believe adding a find_package (Qt4) is a solution not a workaround.

If you want other opinions, you can ask on the mailing list.
(0036216)
Brad King (manager)
2014-06-18 10:18

Adding find_package(Qt4) is the solution and will work with the older CMake versions too. The scope of a find_package result is the calling directory and its descendant directories.
(0036217)
Clinton Stimpson (developer)
2014-06-18 10:52

No change required to CMake.
(0037567)
Robert Maynard (manager)
2015-01-05 08:38

Closing resolved issues that have not been updated in more than 4 months.

 Issue History
Date Modified Username Field Change
2014-06-11 22:21 Pulfer New Issue
2014-06-12 09:16 Brad King Assigned To => Clinton Stimpson
2014-06-12 09:16 Brad King Status new => assigned
2014-06-12 09:52 Clinton Stimpson Note Added: 0036167
2014-06-17 05:37 Pulfer Note Added: 0036210
2014-06-17 09:47 Clinton Stimpson Note Added: 0036212
2014-06-18 10:18 Brad King Note Added: 0036216
2014-06-18 10:52 Clinton Stimpson Note Added: 0036217
2014-06-18 10:52 Clinton Stimpson Status assigned => resolved
2014-06-18 10:52 Clinton Stimpson Resolution open => no change required
2015-01-05 08:38 Robert Maynard Note Added: 0037567
2015-01-05 08:38 Robert Maynard Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team