Hi,

your suggestion would work, but we experienced some problems when setting MITK options from the superbuild level which are actually meant to be changed from "inside" (see http://bugs.mitk.org/show_bug.cgi?id=8722 for the details).

What you can do is to write your own inital CMake cache file for MITK like this:

set(MITK_INITIAL_CACHE_FILE 
"${CMAKE_CURRENT_BINARY_DIR}/mitk_initial_cache.txt")
file(WRITE "${mitk_initial_cache_file}" "
set(MITK_BUILD_org.mitk.gui.qt.segmentation ON CACHE INTERNAL \"Build the 
segmentation plugin\")
")


If you put this code inside your project's CMake files, before your CMakeExternals/MITK.cmake file is called, the variable MITK_INITIAL_CACHE_FILE will be recognized by MITK.cmake and MITK's Superbuild.cmake scripts.

Best,
Sascha

On 08/09/2011 08:42 AM, Clarkson, Matt wrote:
Hi there,

i am building an external project, and I would like to include some of the MITK plugins, eg. segmentation. So, how can I build MITK, using just the top level SuperBuild.cmake, without having to go back and manually turn this plugin on after the main build.

As far as I can tell, you would need boolean variables in SuperBuild.cmake for each plugin, that then gets passed through to the MITK configure step.

Is this possible? If not can we add this as a change request?
Just looking at SuperBuild.cmake, would this work:

Change this:

SET(mitk_cmake_boolean_args
  BUILD_SHARED_LIBS
  WITH_COVERAGE
  BUILD_TESTING


  MITK_USE_QT
  MITK_BUILD_ALL_PLUGINS
  MITK_BUILD_TUTORIAL
  MITK_USE_Boost
  MITK_USE_BLUEBERRY
  MITK_USE_CTK
  MITK_USE_DCMTK
  MITK_USE_OpenCV
  )

to this:

SET(mitk_cmake_boolean_args
  BUILD_SHARED_LIBS
  WITH_COVERAGE
  BUILD_TESTING

  MITK_USE_QT
  MITK_BUILD_ALL_PLUGINS
  MITK_BUILD_TUTORIAL
  MITK_USE_Boost
  MITK_USE_BLUEBERRY
  MITK_USE_CTK
  MITK_USE_DCMTK
  MITK_USE_OpenCV
  ${mitk_cmake_boolean_args}
  )

as then I could set it when building MITK from my external project.

Thanks

Matt

------------------------------------------------------
Matt Clarkson Ph.D.
CMIC Software Manager
Senior Research Associate
[email protected] <mailto:[email protected]>

Centre For Medical Image Computing
http://cmic.cs.ucl.ac.uk/staff/matt_clarkson/ <http://cmic.cs.ucl.ac.uk/>
Tel: 020 7679 0221
Fax: 020 7679 0255

Dementia Research Centre
http://dementia.ion.ucl.ac.uk/
Tel: 08451 555 000 ext. 723653
Fax: 020 7676 2066
------------------------------------------------------







------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
mitk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to