0
votes

I am currently opening my project in qtcreator by simply opening the CMakeLists.txt file associated with my project. This is working great as I can build, debug and run the project from qtcreator. Now I am trying to run cmake with the argument -DPCL_DIR=/usr/local which changes the default path of the PCL library which I am using in my code. I can do this fine from the command line. However when trying to do it from qtcreator using the cmake wizard it ignores the -DPCL_DIR option and compiles using the default library location. How can I get qtcreator to not ignore the cmake argument??

Alternatively I can run cmake from command line and somehow get qtcreator to point to the Makefile generated by the command line cmake run, but I don't know how to do that.

A solution to any of the above problems is appreciated.

1
What version of Qt creator are you using, and are you entering -DPCL_DIR=/usr/local in the Arguments textbox of the Run Cmake dialog?Dan O
Qt Creator 2.4.1 Based on Qt 4.8.0 (64 bit). yes I am entering -DPCL_DIR=/usr/local in the arguments textbox of the run cmake dialogMustafa
Creator is now on 2.8. Is it possible for you to upgrade to something more recent? Maybe at least 2.7? I have a cmake project locally and I'm able to pass arguments to cmake.Dan O
I will look into upgrading. Thank you.Mustafa
the upgrade fixed the problem. thanks againMustafa

1 Answers

2
votes

Upgrading to qtcreator 2.8 solved the problem.

One make shift solution I found that does not require an upgrade of qtcreator, is to simply run cmake -DPCL_DIR inside the qtcreator-build folder from terminal and then simply build from qtcreator without running cmake.