View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006286CMakeQtDialogpublic2008-01-29 16:032008-02-20 08:34
ReporterMike Jackson 
Assigned ToClinton Stimpson 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006286: QtDialog does not properly find cmake on OS X
DescriptionQtDialog properly sets the path to cmake in the constructor of QCmake.cxx. During the 'configure' operation, when cmake::AddPaths() is called the value of this->CMakeCommand is NOT checked first for a valid path and instead a new incorrect path is constructed. This blocks the QtDialog from being used on a daily basis. This will effect OS X systems. Suggested code to fix issue is in additional Information.
Additional InformationIn the cmake.cxx file the top of the AddPaths() method should be changed to the following:

// at the end of this CMAKE_ROOT and CMAKE_COMMAND should be added to the
// cache
int cmake::AddCMakePaths()
  std::string cMakeSelf = this->CMakeCommand;
  if ( cMakeSelf.empty() == true)
    // Find the cmake executable
    cMakeSelf = cmSystemTools::GetExecutableDirectory();
    cMakeSelf += "/cmake";
    cMakeSelf += cmSystemTools::GetExecutableExtension();
    std::cout << "cmake::AddCMakePaths() cMakeSelf: " << cMakeSelf << std::endl;
      cmSystemTools::Error("CMake executable cannot be found at ",
      return 0;

TagsNo tags attached.
Attached Files


Mike Jackson (reporter)
2008-01-29 16:06

The following should be added to the CMakeLists.txt file in the QtDialog directory.

    IF (APPLE)
          ccmake cmake cmakexbuild cpack ctest DumpDocumentation OSXScriptLauncher
           SET (dest "${EXECUTABLE_OUTPUT_PATH}/${_file}")
           MESSAGE(STATUS " Copying ${dest}")
             TARGET QtDialog
             ARGS -E copy ${EXECUTABLE_OUTPUT_PATH}/${_file} ${dest}

This will ensure the binaries are properly copied into the Application bundle.
Clinton Stimpson (developer)
2008-02-06 11:24

I tried that patch for cmake.cxx, and it works if you always run QtDialog, but the makefile breaks if you have the makefile do a cmake run.

One idea would be to have all the cmake apps call SetCMakeCommand with a full path (some do and some don't).

Then the suggested cmake.cxx patch could be simplified, and just throw an error if CMakeCommand isn't set correctly.
Clinton Stimpson (developer)
2008-02-06 14:47

I actually changed Source/QtDialog/CMakeSetup.cxx (revision 1.12), so it reports to the cmake library the correct location of the cmake executables dir. There's no need to patch cmake.cxx.
Clinton Stimpson (developer)
2008-02-18 16:17

The finding of cmake was fixed.
If you still have a problem with deployment, please make a separate bug for it.
Someone else appears to have been working on that.
Mike Jackson (reporter)
2008-02-20 08:34

The latest CMake does indeed properly find cmake now.

 Issue History
Date Modified Username Field Change
2008-01-29 16:03 Mike Jackson New Issue
2008-01-29 16:06 Mike Jackson Note Added: 0010334
2008-02-06 11:24 Clinton Stimpson Note Added: 0010396
2008-02-06 13:16 Alex Neundorf Assigned To => Clinton Stimpson
2008-02-06 13:16 Alex Neundorf Status new => assigned
2008-02-06 14:47 Clinton Stimpson Note Added: 0010400
2008-02-18 16:17 Clinton Stimpson Status assigned => closed
2008-02-18 16:17 Clinton Stimpson Note Added: 0010550
2008-02-18 16:17 Clinton Stimpson Resolution open => fixed
2008-02-20 08:34 Mike Jackson Note Added: 0010597

Copyright © 2000 - 2018 MantisBT Team