How do I set up the IDE for CustusX for plugin development?

I downloaded CustusX from the home page and tried to follow the build instructions . (with ./cxInstaller.py --full --all -t RelWithDebInfo

as the last command. This was smooth on Kubuntu 14.04.

Now that everything was tested and available on the hard drive, I tried to set up the project so that I could do some debugging from the IDE, for example. qtcreator or eclipse. I searched for the documentation but didn't find it there.

I tried to point cmake-gui to / [... ]/custusx/CX/CX, chose Eclipse CDT4 - Ninja and tried to configure. But it fails as it cannot find FindEigen.cmake:

CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find Eigen (missing: EIGEN_INCLUDE_DIR EIGEN_VERSION_OK)
  (Required is at least version "2.91.0")
Call Stack (most recent call first):

      

/usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE) CMake / FindEigen.cmake: 76 (find_package_handle_standard_args) CMake / cxInitializeLibraries.cmakeList: 27 / finditializeLibraries.cmakeList: 27 / find

I can see there is CMake in the directory FindEigen.cmake

, but the installation CMAKE_MODULE_PATH

didn't help either.

QtCreator didn't work as it is experiencing the same issues parsing CMake files when pointing to CMakeLists.txt in custusx/CX/CX

So the question is how to get the setup running in the IDE's preferred qtcreator or eclipse for custusx plugin development?

+3


source to share


2 answers


CustusX is configured using superbuild cxInstaller.py

. As part of this build, cmake is called with parameters:

cmake arguments source_folder

Example located in the build folder /home/cas/cx/CX/build_Release

:

cmake -G "Eclipse CDT4 - Ninja" -DCMAKE_BUILD_TYPE: STRING = Release -DEIGEN_INCLUDE_DIR: PATH = / home / cas / cx / eigen / eigen -DCTK_DIR: PATH = / home / cas / cx / CTK / build_Release -DOpenCV_DIR / home / cas / cx / OpenCV / build_Release ... more arguments omitted ... / home / cas / cx / CX / CX

You can find this command by looking at the console output cxInstaller.py

under the heading == configure CustusX ==

. After the superboil starts up once, you can start using cmake-gui , QtCreator, or Eclipse :



If using cmake-gui, set "Where to put the binaries" in your build folder. This will automatically load the existing cmake config. In your case, cmake-gui probably tried to set up from scratch, no arguments.

When using QtCreator, first open the CustusX CMakeLists.txt

. This will take you to the Configure Project page. The cmake config has to be added manually: specify the location of the build folder and then configure what fails. Then in "Project-> Build Settings-> CMake arguments" paste all the arguments that superbuild ( cxInstaller.py

) sent to cmake ie To cmake command line excluding cmake and source folder. If you are using a ninja, you might have to tweak this.

It looks like the current version of QtCreator (3.0.1, Ubuntu 14.04) does not read the project's cmake config which requires the above procedure. This was not needed with the version shipped with Ubuntu 12.04.

When using Eclipse, use Import, then General> Existing Projects to Workspace, select CX as the root directory when CustusX should appear as a project that can be imported directly (Note !: If you have previously configured to use QtCreator, the Eclipse project files will be deleted. Run superbuild again)

+3


source


How to set up QtCreator 3.0.1 (not required for other versions of QtCreator) on Ubuntu 14.04 for CustusX:

Get CMake arguments (with minimal output):

./install/cxInstaller.py --configure -t RelWithDebInfo CustusX

      



Output search for a (long) line starting with cmake

and ending with...cx/CX/CX

Paste in these arguments in Project-> Build Settings-> CMake arguments

+3


source







All Articles