View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013051CMakeCMakepublic2012-03-18 09:122016-06-10 14:31
ReporterDaniel Franke 
Assigned ToClinton Stimpson 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionmoved 
Platformx86_64OSMAC OS XOS Version10.7.3
Product VersionCMake 2.8.7 
Target VersionFixed in Version 
Summary0013051: DeployQt4.cmake: INSTALL not scriptable
DescriptionAs DeployQt4 is based on BundleUtilities, I figured I can use it in the same way, namely:

  install (CODE "include (DeployQt4)
                 FIXUP_QT4_EXECUTABLE (\"${PREFIX}/${APP_DEFAULT_ARGS}.app\"
                                       \"${PLUGINS}\"
                                       \"\"
                                       \"${PREFIX}/Frameworks\"
                                       \"${PREFIX}/Frameworks/Plugins\")")

Which is described here: http://www.cmake.org/Wiki/BundleUtilitiesExample [^]

However, when run, one gets:
CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/DeployQt4.cmake:211 (install):
  Command install() is not scriptable
Call Stack (most recent call first):
  /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/DeployQt4.cmake:221 (install_qt4_plugin_path)
  /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/DeployQt4.cmake:144 (install_qt4_plugin)
  saxsview/svplot/cmake_install.cmake:48 (FIXUP_QT4_EXECUTABLE)
TagsNo tags attached.
Attached Filesgz file icon bug13051.tar.gz [^] (566 bytes) 2012-04-04 14:11
gz file icon bug13051-2.tar.gz [^] (599 bytes) 2012-04-04 14:21

 Relationships

  Notes
(0028932)
Eric NOULARD (developer)
2012-03-18 13:08

install(CODE ...) runs the provided script snipped at install time
using CMake in "script mode" (like cmake -P ...). In this mode
some command may not be used (add_library, add_executable, install, etc...)
thus the error.

The solution must be discussed with the DeployQt4 author,
but sometimes [depending on the context]

install(FILES ...)

commands may be replaced by

file(INSTALL ...)

The later is scriptable BUT it is NOT doing the same work.
Read the documentation:
cmake --help-command FILE
cmake --help-command INSTALL
(0028936)
Clinton Stimpson (developer)
2012-03-19 10:29

Does your PLUGINS variable contain absolute paths to plugins? It should.
Also, if you need someone else to look at it, can you please make a simple test case to demonstrate the problem?
(0029080)
Daniel Franke (reporter)
2012-04-04 14:24

Please disregard the first file, I messed up the packing.

The updated file (bug13051-2.tar.gz) contains two files, a dummy cpp and the corresponding CMakeLists.txt.

$ tar xfz bug13051-2.tar.gz
$ cd bug13051
$ mkdir build
$ cd build
$ cmake ..
$ make all install DESTDIR=/tmp
[...]
CMake Error at /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/DeployQt4.cmake:211 (install):
  Command install() is not scriptable
[...]

P.S. If one removes the plugin, one ends up at report 0013052 ...
(0029091)
Clinton Stimpson (developer)
2012-04-06 17:01

You need to use absolute paths to the plugin files.
It doesn't work to give it the directory containing the plugins.
(0029126)
Daniel Franke (reporter)
2012-04-11 12:28

> It doesn't work to give it the directory containing the plugins.

No idea how the filename didn't make it into the package?! However, without the file, one gets a different error. Try adding a plugin name.

-- fixup_qt4_executable
-- executable='/Applications/saxsview/'
-- qtplugins='/Developer/Applications/Qt/plugins/imageformats/libqjpeg.dylib'
[...]
Command install() is not scriptable
(0029127)
Daniel Franke (reporter)
2012-04-11 12:47

Eric, your suggestion seems to actually fix it. With the change below, my project gets properly deployed:

--- /Applications/CMake 2.8-7.app/Contents/share/cmake-2.8/Modules/DeployQt4.cmake 2011-12-30 17:40:14.000000000 +0100
+++ ../cmake/DeployQt4.cmake 2012-04-11 18:36:47.000000000 +0200
@@ -208,7 +208,7 @@
                         else()
                                 unset(configurations)
                         endif()
- install(FILES "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
+ file(INSTALL "${plugin}" DESTINATION "${plugins_path}" ${configurations} ${component})
                 endif()
                 set(${installed_plugin_path_var} ${${installed_path_var}} "${plugins_path}/${plugin_name}" PARENT_SCOPE)
         endif()
(0029154)
Clinton Stimpson (developer)
2012-04-13 17:24

I don't think we can apply your patch. It would break the non-scripted usage of that function, where we actually want to use the install() command. Though, I do wish the non-scriptable and scriptable code was kept separate.

Can you please try it off of 2.8.8 RC or git master. DeployQt4.cmake was quite broken in 2.8.7.
(0042008)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2012-03-18 09:12 Daniel Franke New Issue
2012-03-18 13:08 Eric NOULARD Note Added: 0028932
2012-03-19 08:43 Brad King Assigned To => Clinton Stimpson
2012-03-19 08:43 Brad King Status new => assigned
2012-03-19 10:29 Clinton Stimpson Note Added: 0028936
2012-04-04 14:11 Daniel Franke File Added: bug13051.tar.gz
2012-04-04 14:21 Daniel Franke File Added: bug13051-2.tar.gz
2012-04-04 14:24 Daniel Franke Note Added: 0029080
2012-04-06 17:01 Clinton Stimpson Note Added: 0029091
2012-04-11 12:28 Daniel Franke Note Added: 0029126
2012-04-11 12:47 Daniel Franke Note Added: 0029127
2012-04-13 17:24 Clinton Stimpson Note Added: 0029154
2012-08-13 23:28 Clinton Stimpson Status assigned => backlog
2016-06-10 14:28 Kitware Robot Note Added: 0042008
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team