Difference between revisions of "Fixing external projects"

From mitk.org
Jump to navigation Jump to search
 
Line 11: Line 11:
 
)
 
)
 
</nowiki></pre>
 
</nowiki></pre>
 +
 +
* The TARGET_LINK_LIBRARIES command for your executable should now look like
 +
 +
<pre><nowiki>
 +
TARGET_LINK_LIBRARIES(<executable-target> org_blueberry_osgi)
 +
</nowiki></pre>
 +
 +
 +
* Your applications .ini file needs an additional entry:
 +
 +
<pre><nowiki>
 +
BlueBerry.provisioning=@MITK_PLUGIN_PROVISIONING_FILE@
 +
</nowiki></pre>
 +
  
 
* Your executables .cpp file usually contains a statement like
 
* Your executables .cpp file usually contains a statement like
Line 18: Line 32:
 
</nowiki></pre>
 
</nowiki></pre>
  
which must be changed to<<BR>>
+
* which must be changed to
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
Line 24: Line 38:
 
</nowiki></pre>
 
</nowiki></pre>
  
* The TARGET_LINK_LIBRARIES command for your executable should now look like
+
 
 +
* Further, your executables .cpp file  must now create a QApplication instance. So add the include directive  "#include <QApplication>" and add the following lines at the  beginning of your main method:
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
TARGET_LINK_LIBRARIES(<executable-target> org_blueberry_osgi)
+
// Create a QApplication instance first
 +
QApplication myApp(argc, argv);
 +
myApp.setApplicationName("MyApp");
 +
myApp.setOrganizationName("My Organization");
 
</nowiki></pre>
 
</nowiki></pre>

Revision as of 19:33, 30 May 2011

If you generated a MITK project using the BundleGenerator, your projects build system probably needs a couple of tweaks to work with the new CTK-based BlueBerry.

  • Your custom executable needs a different set of include directories. The new variables to use are:
INCLUDE_DIRECTORIES(
  ${org_blueberry_osgi_INCLUDE_DIRS}
  ${Poco_INCLUDE_DIRS}
  ${mbilog_INCLUDE_DIRS}
)
  • The TARGET_LINK_LIBRARIES command for your executable should now look like
TARGET_LINK_LIBRARIES(<executable-target> org_blueberry_osgi)


  • Your applications .ini file needs an additional entry:
BlueBerry.provisioning=@MITK_PLUGIN_PROVISIONING_FILE@


  • Your executables .cpp file usually contains a statement like
#include <org.blueberry.osgi/src/application/berryStarter.h>
  • which must be changed to
#include <berryStarter.h>


  • Further, your executables .cpp file must now create a QApplication instance. So add the include directive "#include <QApplication>" and add the following lines at the beginning of your main method:
// Create a QApplication instance first
QApplication myApp(argc, argv);
myApp.setApplicationName("MyApp");
myApp.setOrganizationName("My Organization");