AutomocInfo.cmake.in depends on environment variables

Bug #1281652 reported by Andreas Pokorny on 2014-02-18
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cmake (Ubuntu)
Undecided
Unassigned

Bug Description

The cmake modules found in cmake 2.8.12.2-0ubuntu1 contain a qt moc configuration template file that gets generated into the build directory of a qt based project.
--- snip ----
set(AM_QT_MOC_EXECUTABLE "@_qt_moc_executable@")
if(DEFINED ENV{DEB_BUILD_MULTIARCH} AND DEFINED ENV{DEB_HOST_MULTIARCH} AND "@_qt_moc_executable@" MATCHES "/usr/lib/$ENV{DEB_HOST_MULTIARCH}/qt5/bin/moc")
  set(AM_QT_MOC_EXECUTABLE "/usr/lib/$ENV{DEB_BUILD_MULTIARCH}/qt5/bin/moc")
endif()
--- snip ---

This is un-handy as it requires DEB_HOST_MULTIARCH and DEB_HOST_MULTIARCH to be set everytime you build.
Usually cmake configuration files are used to hard-code all movable parts at build configuration time.

Since you cannot switch architecture in a build directory in any way there is no need to have that configureable at build time. It would be nice if there is a way to evaluate the environment variables only once configuration build time.

Hi, do you have a patch for this issue?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers