如何打开Qt Creator项目(itk-snap)使用Cmake [英] How open Qt Creator project (itk-snap) using Cmake

查看:2862
本文介绍了如何打开Qt Creator项目(itk-snap)使用Cmake的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣导入 Itk-snap 源代码在Qt5.4。基于他们的帮助,我可以使用cmake(3.4.1)在我的系统中构建可执行文件。然后,我已经导入Cmakelist.txt在Qt的创建者,按运行camke。它配置成功,但我看不到项目文件(没有main.cpp或任何文件在左面板)! ,不能构建它,因为它没有加载在Qt的创建者。

I am interested to import Itk-snap source code in Qt5.4. Based on their help I could built the executable itksnap in my system using cmake(3.4.1). Then, I have imported the Cmakelist.txt in Qt creator and pressed "run camke". It is configured successfully, but I cannot see the project file ( no main.cpp or any file in left panel)! , cannot build it because it does not loaded in Qt creator.

我该怎么办?我如何可以在我的QT创建者itksnap。

What do I do wrong? How can I have itksnap in my QT creator.

我使用的是OSX和camix的unix生成器。

I am using OSX, and unix generator for camke.

推荐答案

最后,我可以找出错误的原因。对于有兴趣和有类似我的问题,我建议做:首先使用Cmake-Gui构建itk-snap源文件的二进制文件,并基于他们对不同文件夹的帮助构建。确定您可以制作二进制文件后,转到Qt-Creator,更改Kit和其他设置(如果它不正确),然后从itk-snap源打开Cmakelist.txt。它显示一个窗口,以运行QT创建器内的cmake。回到您的Cmake-Gui和工具>>显示我的更改菜单,将参数复制到QT中的参数textBox。在我的情况下,变量是

Finally, I could find out what was wrong. For whoever is interested and have same problem like me, I recommend to do : first to build binary of itk-snap source file using Cmake-Gui and build based on their help to the different folder. After you are sure that you can make the binary file, goes to the Qt-Creator, change the Kit and other setting if its not correct, then open Cmakelist.txt from source of itk-snap. It shows a windows to run the cmake inside the QT-creator. Go back to your Cmake-Gui and from Tools >> show my changes menu, copy the argument and past to the argument textBox in QT. In my case variables are


-DVTK_REQUIRED_OBJCXX_FLAGS:STRING =-DSNAP_USE_GPU:BOOL =1-DVTK_DIR:PATH =/ /../itkSnap3/vtk/build-DITK_DIR:PATH =/ Users /../ itkSnap3 / itk / build-DCMAKE_PREFIX_PATH:PATH =/ usr / local / Cellar / qt5 / 5.5.1_2 / lib /

-DVTK_REQUIRED_OBJCXX_FLAGS:STRING="" -DSNAP_USE_GPU:BOOL="1" -DVTK_DIR:PATH="/Users/../itkSnap3/vtk/build" -DITK_DIR:PATH="/Users/../itkSnap3/itk/build" -DCMAKE_PREFIX_PATH:PATH="/usr/local/Cellar/qt5/5.5.1_2/lib/cmake"

祝你好运

这篇关于如何打开Qt Creator项目(itk-snap)使用Cmake的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆