Hi Sascha,
thanks for you quick reply. It's working fine now with your Cmake File and a
batch file to set up the correct environment with all mitk, itk, vtk etc. path
in it.
However, I would like to ask another question. I've compiled the superbuild and
had no flag to set the TOF Hardwar enabled. Redoing it without the superbuild
enabled me to set these options. Still, I get an error when I try to execute
the ExtApp that the liborg_mitk_gui_qt_toftutoriald can not be loaded, although
it's exactly in the path where the ExtApp is looking for it. I checked the
plugin and manifest file but it seems ok. Do you have any idea?
Thank you for your help
Timm
> Hi Timm,
>
> here is a minimal CMakeLists.txt which should work for you (I assume you
> are using the latest git sources):
>
> # ====================================================
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8.2)
>
> PROJECT(Step1)
>
> set(project_policies
> CMP0001 # NEW: CMAKE_BACKWARDS_COMPATIBILITY should no longer be used.
> CMP0002 # NEW: Logical target names must be globally unique.
> CMP0003 # NEW: Libraries linked via full path no longer produce
> linker search paths.
> CMP0004 # NEW: Libraries linked may NOT have leading or trailing
> whitespace.
> CMP0005 # NEW: Preprocessor definition values are now escaped
> automatically.
> CMP0006 # NEW: Installing MACOSX_BUNDLE targets requires a BUNDLE
> DESTINATION.
> CMP0007 # NEW: List command no longer ignores empty elements.
> CMP0008 # NEW: Libraries linked by full-path must have a valid
> library file name.
> CMP0009 # NEW: FILE GLOB_RECURSE calls should not follow symlinks by
> default.
> CMP0010 # NEW: Bad variable reference syntax is an error.
> CMP0011 # NEW: Included scripts do automatic cmake_policy PUSH and POP.
> CMP0012 # NEW: if() recognizes numbers and boolean constants.
> CMP0013 # NEW: Duplicate binary directories are not allowed.
> CMP0014 # NEW: Input directories must have CMakeLists.txt
> )
> foreach(policy ${project_policies})
> if(POLICY ${policy})
> cmake_policy(SET ${policy} NEW)
> endif()
> endforeach()
>
> FIND_PACKAGE(MITK REQUIRED)
>
> MITK_USE_MODULE(QmitkExt)
>
> INCLUDE_DIRECTORIES(
> ${CMAKE_CURRENT_SOURCE_DIR}
> ${ALL_INCLUDE_DIRECTORIES}
> )
> LINK_DIRECTORIES(${MITK_LINK_DIRECTORIES})
>
> ADD_EXECUTABLE(Step1 Step1.cpp QtTesting.cpp)
> TARGET_LINK_LIBRARIES(Step1 ${ALL_LIBRARIES})
> # ====================================================
>
> Note that you also need the QtTesting.h and QtTesting.cpp files from the
> Tutorial directory in MITK and you need to use the same CMAKE_BUILD_TYPE
> in your project as in your MITK build.
>
> Best,
> Sascha
>
>
> On 05/18/2011 03:29 PM, [email protected] wrote:
> > Hi,
> >
> > I'm trying to get started with MITK by following the tutorial steps.
> I've successfully build MITK via the superbuild option. Now I've copied
> step1.cpp into a new folder and wrote my own CMakeLists holding the following
> information:
> >
> > PROJECT(Step1)
> >
> > CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
> > if(COMMAND cmake_policy)
> > cmake_policy(SET CMP0003 OLD)
> > endif(COMMAND cmake_policy)
> >
> > FIND_PACKAGE(MITK REQUIRED)
> > FIND_PACKAGE(Qt4 REQUIRED)
> >
> > INCLUDE(${QT_USE_FILE})
> >
> >
> > FIND_PACKAGE(ITK REQUIRED)
> > FIND_PACKAGE(VTK REQUIRED)
> >
> > INCLUDE_DIRECTORIES(${QMITK_INCLUDE_DIRS})
> > LINK_DIRECTORIES(${MITK_LINK_DIRECTORIES})
> >
> > ADD_EXECUTABLE(Step1 Step1.cpp)
> > TARGET_LINK_LIBRARIES(Step1 ${QMITK_LIBRARIES} ${QT_LIBRARIES})
> >
> >
> >
> > however, when I try to compile step1 I get an error "itkObject.h": No
> such file or directory.
> > It's probably simple to solve but I'm not familiar with writing CMake
> files.
> > I'm using Visual Studio 2008.
> > all the best and thanks for your help
> > Timm
>
>
> ------------------------------------------------------------------------------
> What Every C/C++ and Fortran developer Should Know!
> Read this article and learn how Intel has extended the reach of its
> next-generation tools to help Windows* and Linux* C/C++ and Fortran
> developers boost performance applications - including clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> mitk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mitk-users
--
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
------------------------------------------------------------------------------
What Every C/C++ and Fortran developer Should Know!
Read this article and learn how Intel has extended the reach of its
next-generation tools to help Windows* and Linux* C/C++ and Fortran
developers boost performance applications - including clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users