[qtcreator-ros] CMake Project parsing failed.

asked 2019-02-01 07:47:33 -0500

plc66 gravatar image

updated 2019-02-01 07:48:33 -0500

Hello,

Using Ubuntu 18.04 & melodic, using Qt Creator 4.8.0-rc1 (4.7.84), and Qt5.12.0.

The general idea is that I have reinstalled fully my PC, and want to keep on working on a project started under kinetic.

catkin_make from the terminal works without issues, and my package compiles fine and runs without issue once built. However I am trying to setup qt creator and the project does not parse. It fails to find my packages in /opt/ros/melodic .

Error message in the Issues section goes as follow :

/opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83: error: Could not find a package configuration file provided by "qt_gui_cpp" with any of the following names: qt_gui_cppConfig.cmake qt_gui_cpp-config.cmake Add the installation prefix of "qt_gui_cpp" to CMAKE_PREFIX_PATH or set "qt_gui_cpp_DIR" to a directory containing one of the above files.  If "qt_gui_cpp" provides a separate development package or SDK, be sure it has been installed. CMakeLists.txt:13 (find_package)

The qt_gui_cpp package is not entirely relvant, as it does that for all the packages mentioned in the CMakelists.txt. (and they are all here)

The environment variable CMAKE_PREFIX_PATH is setup to my /opt/ros/melodic , so the following answer is not working: link text

Also qt creator is started from the terminal so no issue with sourcing.

I tried to resolve manually every package DIR in Project -> Build settings -> Environment variables , but it is tedious and I hit a couple of wall when I go down this path. It used to be pretty seamless.

In the General Message section I get :

Starting to parse CMake project, using: "-DCMAKE_BUILD_TYPE:STRING=Debug", "-DCMAKE_CXX_COMPILER:STRING=/usr/bin/g++", "-DCMAKE_C_COMPILER:STRING=/usr/bin/gcc", "-DCMAKE_INSTALL_PREFIX:PATH=/home/pilou/catkin_ws/install", "-DCMAKE_PREFIX_PATH:STRING=/home/pilou/catkin_ws/devel:/opt/ros/melodic", "-DQT_QMAKE_EXECUTABLE:STRING=/home/pilou/Qt/5.12.0/gcc_64/bin/qmake".
Using CATKIN_DEVEL_PREFIX: /home/pilou/catkin_ws/build/devel
Using CMAKE_PREFIX_PATH: /home/pilou/catkin_ws/devel:/opt/ros/melodic
Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.15", minimum required is "2") 
Using PYTHON_EXECUTABLE: /usr/bin/python2
Using Debian Python package layout
Using empy: /usr/bin/empy
Using CATKIN_ENABLE_TESTING: ON
Call enable_testing()
Using CATKIN_TEST_RESULTS_DIR: /home/pilou/catkin_ws/build/test_results
Found gmock sources under '/usr/src/googletest': gmock will be built
Found PythonInterp: /usr/bin/python2 (found version "2.7.15") 
Found gtest sources under '/usr/src/googletest': gtests will be built
Using Python nosetests: /usr/bin/nosetests-2.7
catkin 0.7.14
Could NOT find qt_gui_cpp (missing: qt_gui_cpp_DIR)
Could not find the required component 'qt_gui_cpp'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
  Could not find a package configuration file provided by "qt_gui_cpp" with
  any of the following names:

    qt_gui_cppConfig.cmake
    qt_gui_cpp-config.cmake

  Add the installation prefix of "qt_gui_cpp" to CMAKE_PREFIX_PATH or set
  "qt_gui_cpp_DIR" to a directory containing one of ...
(more)
edit retag flag offensive close merge delete

Comments

I have the same issue, have you solved it?

Marcus Barnet gravatar image Marcus Barnet  ( 2021-06-11 13:35:56 -0500 )edit