Ver código fonte

ENH: PluginFramework: Created a separate PluginFramework library

Sascha Zelzer 15 anos atrás
pai
commit
9e3ee1003c
71 arquivos alterados com 191 adições e 99 exclusões
  1. 2 2
      Applications/ctkCLIPluginExplorer/CMakeLists.txt
  2. 1 1
      Applications/ctkCLIPluginExplorer/target_libraries.cmake
  3. 2 2
      Applications/ctkPluginBrowser/CMakeLists.txt
  4. 2 2
      Applications/ctkPluginBrowser/ctkPluginBrowser.cxx
  5. 3 3
      Applications/ctkPluginBrowser/ctkPluginBrowserMain.cxx
  6. 1 1
      Applications/ctkPluginBrowser/ctkPluginResourcesTreeModel.cxx
  7. 2 2
      Applications/ctkPluginBrowser/ctkPluginTableModel.cxx
  8. 1 1
      Applications/ctkPluginBrowser/ctkPluginTableModel.h
  9. 1 1
      Applications/ctkPluginBrowser/target_libraries.cmake
  10. 6 0
      CMake/ctkMacroBuildPlugin.cmake
  11. 2 2
      CMake/ctkMacroExtractOptionNameAndValue.cmake
  12. 3 2
      CMakeLists.txt
  13. 0 36
      Libs/Core/CMakeLists.txt
  14. 110 0
      Libs/PluginFramework/CMakeLists.txt
  15. 0 0
      Libs/PluginFramework/EventBus/ctkEvent.cxx
  16. 3 3
      Libs/Core/EventBus/ctkEvent.h
  17. 0 0
      Libs/PluginFramework/EventBus/ctkEventBus.h
  18. 0 0
      Libs/PluginFramework/EventBus/ctkEventConstants.cxx
  19. 2 2
      Libs/Core/EventBus/ctkEventConstants.h
  20. 0 0
      Libs/PluginFramework/ctkLDAPSearchFilter.cxx
  21. 2 2
      Libs/Core/PluginFramework/ctkLDAPSearchFilter.h
  22. 0 0
      Libs/PluginFramework/ctkPlugin.cxx
  23. 1 1
      Libs/Core/PluginFramework/ctkPlugin.h
  24. 1 1
      Libs/Core/PluginFramework/ctkPluginActivator.h
  25. 0 0
      Libs/PluginFramework/ctkPluginArchive.cxx
  26. 0 0
      Libs/PluginFramework/ctkPluginArchive_p.h
  27. 0 0
      Libs/PluginFramework/ctkPluginConstants.cxx
  28. 2 2
      Libs/Core/PluginFramework/ctkPluginConstants.h
  29. 0 0
      Libs/PluginFramework/ctkPluginContext.cxx
  30. 2 2
      Libs/Core/PluginFramework/ctkPluginContext.h
  31. 7 6
      Libs/Core/PluginFramework/ctkPluginDatabase.cxx
  32. 0 0
      Libs/PluginFramework/ctkPluginDatabaseException.cxx
  33. 3 3
      Libs/Core/PluginFramework/ctkPluginDatabaseException.h
  34. 0 0
      Libs/PluginFramework/ctkPluginDatabase_p.h
  35. 0 0
      Libs/PluginFramework/ctkPluginException.cxx
  36. 3 3
      Libs/Core/PluginFramework/ctkPluginException.h
  37. 0 0
      Libs/PluginFramework/ctkPluginFramework.cxx
  38. 2 2
      Libs/Core/PluginFramework/ctkPluginFramework.h
  39. 0 0
      Libs/PluginFramework/ctkPluginFrameworkContext.cxx
  40. 2 2
      Libs/Core/PluginFramework/ctkPluginFrameworkContext.h
  41. 0 0
      Libs/PluginFramework/ctkPluginFrameworkContextPrivate.cxx
  42. 0 0
      Libs/PluginFramework/ctkPluginFrameworkContextPrivate_p.h
  43. 0 0
      Libs/PluginFramework/ctkPluginFrameworkPrivate.cxx
  44. 0 0
      Libs/PluginFramework/ctkPluginFrameworkPrivate_p.h
  45. 0 0
      Libs/PluginFramework/ctkPluginManager.cxx
  46. 2 2
      Libs/Core/PluginFramework/ctkPluginManager.h
  47. 0 0
      Libs/PluginFramework/ctkPluginManifest.cxx
  48. 0 0
      Libs/PluginFramework/ctkPluginManifest_p.h
  49. 0 0
      Libs/PluginFramework/ctkPluginPrivate.cxx
  50. 0 0
      Libs/PluginFramework/ctkPluginPrivate_p.h
  51. 0 0
      Libs/PluginFramework/ctkPluginStorage.cxx
  52. 0 0
      Libs/PluginFramework/ctkPluginStorage_p.h
  53. 0 0
      Libs/PluginFramework/ctkPlugins.cxx
  54. 0 0
      Libs/PluginFramework/ctkPlugins_p.h
  55. 0 0
      Libs/PluginFramework/ctkServiceReference.cxx
  56. 0 0
      Libs/PluginFramework/ctkServiceReference.h
  57. 0 0
      Libs/PluginFramework/ctkServiceRegistration.cxx
  58. 0 0
      Libs/PluginFramework/ctkServiceRegistration.h
  59. 0 0
      Libs/PluginFramework/ctkVersion.cxx
  60. 3 3
      Libs/Core/PluginFramework/ctkVersion.h
  61. 0 0
      Libs/PluginFramework/ctkVersionRange.cxx
  62. 0 0
      Libs/PluginFramework/ctkVersionRange_p.h
  63. 10 0
      Libs/PluginFramework/target_libraries.cmake
  64. 2 2
      Plugins/org.commontk.cli/CMakeLists.txt
  65. 1 1
      Plugins/org.commontk.cli/ctkCLIPlugin.h
  66. 2 2
      Plugins/org.commontk.eventbus/CMakeLists.txt
  67. 1 1
      Plugins/org.commontk.eventbus/ctkEventBusPlugin_p.h
  68. 1 1
      Plugins/org.commontk.eventbus/ctkEventHandlerWrapper_p.h
  69. 1 1
      Plugins/org.commontk.eventbus/target_libraries.cmake
  70. 1 1
      SuperBuild.cmake
  71. 1 1
      Utilities/QtMobility/QtMobility-1.0.0-patch.cmake.in

+ 2 - 2
Applications/ctkCLIPluginExplorer/CMakeLists.txt

@@ -1,7 +1,7 @@
 PROJECT(ctkCLIPluginExplorer)
 
 #
-# See CTK/CMake/ctkMacroBuildQtApp.cmake for details
+# See CTK/CMake/ctkMacroBuildApp.cmake for details
 #
 
 SET(KIT_SRCS
@@ -28,7 +28,7 @@ ctkMacroGetTargetLibraries(KIT_target_libraries)
 SET(KIT_include_directories
   )
 
-ctkMacroBuildQtApp(
+ctkMacroBuildApp(
   NAME ${PROJECT_NAME}
   INCLUDE_DIRECTORIES ${KIT_include_directories}
   SRCS ${KIT_SRCS}

+ 1 - 1
Applications/ctkCLIPluginExplorer/target_libraries.cmake

@@ -5,5 +5,5 @@
 # 
 
 SET(target_libraries
-  CTKCore
+  CTKPluginFramework
   )

+ 2 - 2
Applications/ctkPluginBrowser/CMakeLists.txt

@@ -1,7 +1,7 @@
 PROJECT(ctkPluginBrowser)
 
 #
-# See CTK/CMake/ctkMacroBuildQtApp.cmake for details
+# See CTK/CMake/ctkMacroBuildApp.cmake for details
 #
 
 SET(KIT_SRCS
@@ -34,7 +34,7 @@ ctkMacroGetTargetLibraries(KIT_target_libraries)
 SET(KIT_include_directories
   )
 
-ctkMacroBuildQtApp(
+ctkMacroBuildApp(
   NAME ${PROJECT_NAME}
   INCLUDE_DIRECTORIES ${KIT_include_directories}
   SRCS ${KIT_SRCS}

+ 2 - 2
Applications/ctkPluginBrowser/ctkPluginBrowser.cxx

@@ -27,8 +27,8 @@
 
 #include <ui_ctkPluginBrowserMainWindow.h>
 
-#include <PluginFramework/ctkPluginException.h>
-#include <PluginFramework/ctkPluginFramework.h>
+#include <ctkPluginException.h>
+#include <ctkPluginFramework.h>
 
 #include <QApplication>
 #include <QMainWindow>

+ 3 - 3
Applications/ctkPluginBrowser/ctkPluginBrowserMain.cxx

@@ -19,9 +19,9 @@
 
 =============================================================================*/
 
-#include <PluginFramework/ctkPluginFrameworkContext.h>
-#include <PluginFramework/ctkPluginFramework.h>
-#include <PluginFramework/ctkPluginException.h>
+#include <ctkPluginFrameworkContext.h>
+#include <ctkPluginFramework.h>
+#include <ctkPluginException.h>
 
 #include "ctkPluginBrowser.h"
 

+ 1 - 1
Applications/ctkPluginBrowser/ctkPluginResourcesTreeModel.cxx

@@ -21,7 +21,7 @@
 
 #include "ctkPluginResourcesTreeModel.h"
 
-#include <PluginFramework/ctkPlugin.h>
+#include <ctkPlugin.h>
 
 namespace ctk {
 

+ 2 - 2
Applications/ctkPluginBrowser/ctkPluginTableModel.cxx

@@ -21,8 +21,8 @@
 
 #include "ctkPluginTableModel.h"
 
-#include <PluginFramework/ctkPlugin.h>
-#include <PluginFramework/ctkPluginContext.h>
+#include <ctkPlugin.h>
+#include <ctkPluginContext.h>
 
 namespace ctk {
 

+ 1 - 1
Applications/ctkPluginBrowser/ctkPluginTableModel.h

@@ -26,7 +26,7 @@
 
 #include <QList>
 
-#include <PluginFramework/ctkPlugin.h>
+#include <ctkPlugin.h>
 
 namespace ctk {
 

+ 1 - 1
Applications/ctkPluginBrowser/target_libraries.cmake

@@ -5,5 +5,5 @@
 # 
 
 SET(target_libraries
-  CTKCore
+  CTKPluginFramework
   )

+ 6 - 0
CMake/ctkMacroBuildPlugin.cmake

@@ -60,6 +60,12 @@ MACRO(ctkMacroBuildPlugin)
     QT4_ADD_RESOURCES(MY_QRC_SRCS ${MY_RESOURCES})
   ENDIF()
 
+  # Add the generated manifest qrc file
+  STRING(REPLACE "_" "." plugin_symbolic_name ${lib_name})
+  ctkMacroGeneratePluginManifest(MY_QRC_SRCS
+    SYMBOLIC_NAME ${plugin_symbolic_name}
+    )
+
   SOURCE_GROUP("Resources" FILES
     ${MY_RESOURCES}
     ${MY_UI_FORMS}

+ 2 - 2
CMake/ctkMacroExtractOptionNameAndValue.cmake

@@ -6,7 +6,7 @@
 MACRO(ctkMacroExtractOptionNameAndValue my_opt var_opt_name var_opt_value)
 
  # Make sure option is correctly formated
-  IF(NOT "${my_opt}" MATCHES "^[/A-Za-z0-9]+:(ON|OFF)")
+  IF(NOT "${my_opt}" MATCHES "^[/A-Za-z0-9.]+:(ON|OFF)")
     MESSAGE(FATAL_ERROR "Option ${my_opt} is incorrect. Options should be specified using the following format OPT1:[ON|OFF]. For example OPT1:OFF or OPT2:ON")
   ENDIF()
 
@@ -51,4 +51,4 @@ IF(MACRO_TESTING)
     MESSAGE(FATAL_ERROR "test2_value:${test2_value} - Expected:OFF")
   ENDIF()
   
-ENDIF()
+ENDIF()

+ 3 - 2
CMakeLists.txt

@@ -209,6 +209,7 @@ ENDIF()
 #
 SET(CTK_LIBS
   Core:ON
+  PluginFramework:ON
   Widgets:OFF
   DICOM/Core:OFF
   DICOM/Widgets:OFF
@@ -224,7 +225,7 @@ SET(CTK_LIBS
 #
 SET(CTK_PLUGINS
   org.commontk.eventbus:ON
-  #org.commontk.cli:OFF
+  org.commontk.cli:OFF
   )
 
 #-----------------------------------------------------------------------------
@@ -462,4 +463,4 @@ INCLUDE(Utilities/KWStyle/KWStyle.cmake)
 # The commands in this directory are intended to be executed as
 # the end of the whole configuration process, as a "last step".
 # This directory is typically the last SUBDIRS in the main CMakeLists.txt.
-ADD_SUBDIRECTORY(Utilities/LastConfigureStep)
+ADD_SUBDIRECTORY(Utilities/LastConfigureStep)

+ 0 - 36
Libs/Core/CMakeLists.txt

@@ -14,7 +14,6 @@ SET(KIT_export_directive "CTK_CORE_EXPORT")
 
 # Additional directories to include
 SET(KIT_include_directories
-  ${QTMOBILITY_INCLUDE_DIRS}
   )
   
 # Source files
@@ -39,34 +38,6 @@ SET(KIT_SRCS
   ctkTransferFunction.h
   ctkUtils.cpp
   ctkUtils.h
-
-  # PluginFramework sources
-  PluginFramework/ctkLDAPSearchFilter.cxx
-  PluginFramework/ctkPlugin.cxx
-  PluginFramework/ctkPluginArchive.cxx
-  PluginFramework/ctkPluginConstants.cxx
-  PluginFramework/ctkPluginContext.cxx
-  PluginFramework/ctkPluginDatabase.cxx
-  PluginFramework/ctkPluginDatabaseException.cxx
-  PluginFramework/ctkPluginException.cxx
-  PluginFramework/ctkPluginFramework.cxx
-  PluginFramework/ctkPluginFrameworkContext.cxx
-  PluginFramework/ctkPluginFrameworkContextPrivate.cxx
-  PluginFramework/ctkPluginFrameworkPrivate.cxx
-  PluginFramework/ctkPluginManager.cxx
-  PluginFramework/ctkPluginManifest.cxx
-  PluginFramework/ctkPluginPrivate.cxx
-  PluginFramework/ctkPlugins.cxx
-  PluginFramework/ctkServiceReference.cxx
-  PluginFramework/ctkServiceRegistration.cxx
-  #PluginFramework/ctkServiceRegistry.cxx
-  PluginFramework/ctkPluginStorage.cxx
-  PluginFramework/ctkVersion.cxx
-  PluginFramework/ctkVersionRange.cxx
-
-  # EventBus sources
-  EventBus/ctkEvent.cxx
-  EventBus/ctkEventConstants.cxx
   )
 
 IF(CTK_HAVE_BFD)
@@ -90,13 +61,6 @@ SET(KIT_UI_FORMS
 SET(KIT_resources
 )
 
-# Create a MANIFEST.MF resource for the CTK Core,
-# pretending that is is a plugin (the system plugin)
-ctkMacroGeneratePluginManifest(KIT_SRCS
-  SYMBOLIC_NAME "system.plugin"
-  VERSION "0.9.9"
-  )
-
 # Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
 # The following macro will read the target libraries from the file 'target_libraries.cmake'
 ctkMacroGetTargetLibraries(KIT_target_libraries)

+ 110 - 0
Libs/PluginFramework/CMakeLists.txt

@@ -0,0 +1,110 @@
+PROJECT(CTKPluginFramework)
+
+#
+# 3rd party dependencies
+#
+
+
+# use the QtMobility SuperBuild paths for now
+# we should add a FindQtMobility later
+SET(QTMOBILITY_INCLUDE_DIRS 
+  "${CTK_BINARY_DIR}/../CMakeExternals/Source/QtMobility/install/include"
+  )
+SET(QTMOBILITY_LIBRARY_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}")
+FIND_LIBRARY(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG QtServiceFrameworkd
+             PATHS ${QTMOBILITY_LIBRARY_DIR}
+             )
+             
+FIND_LIBRARY(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE QtServiceFramework
+             PATHS ${QTMOBILITY_LIBRARY_DIR}
+             )
+             
+SET(QTMOBILITY_QTSERVICEFW_LIBRARIES )
+IF(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE AND QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG)
+  SET(QTMOBILITY_QTSERVICEFW_LIBRARIES optimized ${QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE} debug ${QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG})
+ELSEIF(QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG)
+  SET(QTMOBILITY_QTSERVICEFW_LIBRARIES ${QTMOBILITY_QTSERVICEFW_LIBRARY_DEBUG})
+ELSEIF(QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE)
+  SET(QTMOBILITY_QTSERVICEFW_LIBRARIES ${QTMOBILITY_QTSERVICEFW_LIBRARY_RELEASE})
+ENDIF()
+
+#
+# See CTK/CMake/ctkMacroBuildLib.cmake for details
+#
+
+SET(KIT_export_directive "CTK_PLUGINFW_EXPORT")
+
+# Additional directories to include
+SET(KIT_include_directories
+  ${QTMOBILITY_INCLUDE_DIRS}
+  )
+  
+# Source files
+SET(KIT_SRCS
+  ctkLDAPSearchFilter.cxx
+  ctkPlugin.cxx
+  ctkPluginArchive.cxx
+  ctkPluginConstants.cxx
+  ctkPluginContext.cxx
+  ctkPluginDatabase.cxx
+  ctkPluginDatabaseException.cxx
+  ctkPluginException.cxx
+  ctkPluginFramework.cxx
+  ctkPluginFrameworkContext.cxx
+  ctkPluginFrameworkContextPrivate.cxx
+  ctkPluginFrameworkPrivate.cxx
+  ctkPluginManager.cxx
+  ctkPluginManifest.cxx
+  ctkPluginPrivate.cxx
+  ctkPlugins.cxx
+  ctkServiceReference.cxx
+  ctkServiceRegistration.cxx
+  #PluginFramework/ctkServiceRegistry.cxx
+  ctkPluginStorage.cxx
+  ctkVersion.cxx
+  ctkVersionRange.cxx
+
+  # EventBus sources
+  EventBus/ctkEvent.cxx
+  EventBus/ctkEventConstants.cxx
+  )
+
+# Headers that should run through moc
+SET(KIT_MOC_SRCS
+)
+
+# UI files
+SET(KIT_UI_FORMS
+)
+
+# Resources
+SET(KIT_resources
+)
+
+# Create a MANIFEST.MF resource for the PluginFramework library,
+# pretending that is is a plugin (the system plugin)
+ctkMacroGeneratePluginManifest(KIT_SRCS
+  SYMBOLIC_NAME "system.plugin"
+  VERSION "0.9.9"
+  )
+
+# Target libraries - See CMake/ctkMacroGetTargetLibraries.cmake
+# The following macro will read the target libraries from the file 'target_libraries.cmake'
+ctkMacroGetTargetLibraries(KIT_target_libraries)
+
+ctkMacroBuildLib(
+  NAME ${PROJECT_NAME}
+  EXPORT_DIRECTIVE ${KIT_export_directive}
+  INCLUDE_DIRECTORIES ${KIT_include_directories}
+  SRCS ${KIT_SRCS}
+  MOC_SRCS ${KIT_MOC_SRCS}
+  UI_FORMS ${KIT_UI_FORMS}
+  TARGET_LIBRARIES ${KIT_target_libraries}
+  RESOURCES ${KIT_resources}
+  LIBRARY_TYPE ${CTK_LIBRARY_MODE}
+  )
+
+# Testing
+#IF(BUILD_TESTING)
+#  ADD_SUBDIRECTORY(Testing)
+#ENDIF(BUILD_TESTING)

Libs/Core/EventBus/ctkEvent.cxx → Libs/PluginFramework/EventBus/ctkEvent.cxx


+ 3 - 3
Libs/Core/EventBus/ctkEvent.h

@@ -1,19 +1,19 @@
 #ifndef CTKEVENT_H
 #define CTKEVENT_H
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 #include <QMap>
 #include <QVariant>
 #include <QStringList>
 
-#include <PluginFramework/ctkLDAPSearchFilter.h>
+#include <ctkLDAPSearchFilter.h>
 
 namespace ctk {
 
   class EventPrivate;
 
-  class CTK_CORE_EXPORT Event {
+  class CTK_PLUGINFW_EXPORT Event {
 
   public:
 

Libs/Core/EventBus/ctkEventBus.h → Libs/PluginFramework/EventBus/ctkEventBus.h


Libs/Core/EventBus/ctkEventConstants.cxx → Libs/PluginFramework/EventBus/ctkEventConstants.cxx


+ 2 - 2
Libs/Core/EventBus/ctkEventConstants.h

@@ -3,11 +3,11 @@
 
 #include <QString>
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 namespace ctk {
 
-  struct CTK_CORE_EXPORT EventConstants {
+  struct CTK_PLUGINFW_EXPORT EventConstants {
 
     static const QString EVENT_TOPIC; // = "event.topics"
     static const QString EVENT_FILTER; // = "event.filter"

Libs/Core/PluginFramework/ctkLDAPSearchFilter.cxx → Libs/PluginFramework/ctkLDAPSearchFilter.cxx


+ 2 - 2
Libs/Core/PluginFramework/ctkLDAPSearchFilter.h

@@ -22,7 +22,7 @@
 #ifndef CTKLDAPSEARCHFILTER_H
 #define CTKLDAPSEARCHFILTER_H
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 #include <QMap>
 #include <QString>
@@ -32,7 +32,7 @@ namespace ctk {
 
   class LDAPSearchFilterPrivate;
 
-  class CTK_CORE_EXPORT LDAPSearchFilter {
+  class CTK_PLUGINFW_EXPORT LDAPSearchFilter {
 
   public:
 

Libs/Core/PluginFramework/ctkPlugin.cxx → Libs/PluginFramework/ctkPlugin.cxx


+ 1 - 1
Libs/Core/PluginFramework/ctkPlugin.h

@@ -32,7 +32,7 @@ namespace ctk {
   class PluginFrameworkContextPrivate;
   class PluginPrivate;
 
-  class CTK_CORE_EXPORT Plugin {
+  class CTK_PLUGINFW_EXPORT Plugin {
 
     Q_DECLARE_PRIVATE(Plugin)
 

+ 1 - 1
Libs/Core/PluginFramework/ctkPluginActivator.h

@@ -24,7 +24,7 @@
 
 #include "ctkPluginContext.h"
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 namespace ctk {
 

Libs/Core/PluginFramework/ctkPluginArchive.cxx → Libs/PluginFramework/ctkPluginArchive.cxx


Libs/Core/PluginFramework/ctkPluginArchive_p.h → Libs/PluginFramework/ctkPluginArchive_p.h


Libs/Core/PluginFramework/ctkPluginConstants.cxx → Libs/PluginFramework/ctkPluginConstants.cxx


+ 2 - 2
Libs/Core/PluginFramework/ctkPluginConstants.h

@@ -24,11 +24,11 @@
 
 #include <QString>
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 namespace ctk {
 
-  struct CTK_CORE_EXPORT PluginConstants {
+  struct CTK_PLUGINFW_EXPORT PluginConstants {
 
     /**
      * Location identifier of the CTK <i>system plugin</i>, which is defined

Libs/Core/PluginFramework/ctkPluginContext.cxx → Libs/PluginFramework/ctkPluginContext.cxx


+ 2 - 2
Libs/Core/PluginFramework/ctkPluginContext.h

@@ -27,7 +27,7 @@
 #include <QVariant>
 #include <QUrl>
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 
 namespace ctk {
@@ -38,7 +38,7 @@ namespace ctk {
   class ServiceReference;
   class PluginContextPrivate;
 
-  class CTK_CORE_EXPORT PluginContext
+  class CTK_PLUGINFW_EXPORT PluginContext
   {
 
 	  Q_DECLARE_PRIVATE(PluginContext)

+ 7 - 6
Libs/Core/PluginFramework/ctkPluginDatabase.cxx

@@ -325,15 +325,16 @@ PluginArchive* PluginDatabase::insertPlugin(const QUrl& location, const QString&
 
   try
   {
-    commitTransaction(&query);
-
+    PluginArchive* archive = 0;
     if (createArchive)
     {
-      PluginArchive* archive = new PluginArchive(m_PluginStorage, location, localPath,
-                                               pluginId);
-      return archive;
+      archive = new PluginArchive(m_PluginStorage, location, localPath,
+                                  pluginId);
     }
-    else return 0;
+
+    commitTransaction(&query);
+
+    return archive;
   }
   catch (...)
   {

Libs/Core/PluginFramework/ctkPluginDatabaseException.cxx → Libs/PluginFramework/ctkPluginDatabaseException.cxx


+ 3 - 3
Libs/Core/PluginFramework/ctkPluginDatabaseException.h

@@ -22,7 +22,7 @@
 #ifndef CTKPLUGINDATABASEEXCEPTION_H
 #define CTKPLUGINDATABASEEXCEPTION_H
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 #include <stdexcept>
 
@@ -30,7 +30,7 @@
 
 namespace ctk {
 
-  class CTK_CORE_EXPORT PluginDatabaseException : public std::runtime_error
+  class CTK_PLUGINFW_EXPORT PluginDatabaseException : public std::runtime_error
   {
   public:
 
@@ -66,6 +66,6 @@ namespace ctk {
 
 }
 
-CTK_CORE_EXPORT QDebug operator<<(QDebug dbg, const ctk::PluginDatabaseException& exc);
+CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, const ctk::PluginDatabaseException& exc);
 
 #endif // CTKPLUGINDATABASEEXCEPTION_H

Libs/Core/PluginFramework/ctkPluginDatabase_p.h → Libs/PluginFramework/ctkPluginDatabase_p.h


Libs/Core/PluginFramework/ctkPluginException.cxx → Libs/PluginFramework/ctkPluginException.cxx


+ 3 - 3
Libs/Core/PluginFramework/ctkPluginException.h

@@ -27,11 +27,11 @@
 #include <QString>
 #include <QDebug>
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 namespace ctk {
 
-  class CTK_CORE_EXPORT PluginException : public std::runtime_error
+  class CTK_PLUGINFW_EXPORT PluginException : public std::runtime_error
   {
   public:
 
@@ -97,6 +97,6 @@ namespace ctk {
 
 }
 
-CTK_CORE_EXPORT QDebug operator<<(QDebug dbg, const ctk::PluginException& exc);
+CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, const ctk::PluginException& exc);
 
 #endif // CTKPLUGINEXCEPTION_H

Libs/Core/PluginFramework/ctkPluginFramework.cxx → Libs/PluginFramework/ctkPluginFramework.cxx


+ 2 - 2
Libs/Core/PluginFramework/ctkPluginFramework.h

@@ -25,14 +25,14 @@
 #include "ctkPlugin.h"
 
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 namespace ctk {
 
   class PluginFrameworkContextPrivate;
   class PluginFrameworkPrivate;
 
-  class CTK_CORE_EXPORT PluginFramework : public Plugin
+  class CTK_PLUGINFW_EXPORT PluginFramework : public Plugin
   {
 
     Q_DECLARE_PRIVATE(PluginFramework)

Libs/Core/PluginFramework/ctkPluginFrameworkContext.cxx → Libs/PluginFramework/ctkPluginFrameworkContext.cxx


+ 2 - 2
Libs/Core/PluginFramework/ctkPluginFrameworkContext.h

@@ -26,14 +26,14 @@
 #include <QString>
 #include <QVariant>
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 namespace ctk {
 
   class PluginFramework;
   class PluginFrameworkContextPrivate;
 
-  class CTK_CORE_EXPORT PluginFrameworkContext {
+  class CTK_PLUGINFW_EXPORT PluginFrameworkContext {
 
     Q_DECLARE_PRIVATE(PluginFrameworkContext)
 

Libs/Core/PluginFramework/ctkPluginFrameworkContextPrivate.cxx → Libs/PluginFramework/ctkPluginFrameworkContextPrivate.cxx


Libs/Core/PluginFramework/ctkPluginFrameworkContextPrivate_p.h → Libs/PluginFramework/ctkPluginFrameworkContextPrivate_p.h


Libs/Core/PluginFramework/ctkPluginFrameworkPrivate.cxx → Libs/PluginFramework/ctkPluginFrameworkPrivate.cxx


Libs/Core/PluginFramework/ctkPluginFrameworkPrivate_p.h → Libs/PluginFramework/ctkPluginFrameworkPrivate_p.h


Libs/Core/PluginFramework/ctkPluginManager.cxx → Libs/PluginFramework/ctkPluginManager.cxx


+ 2 - 2
Libs/Core/PluginFramework/ctkPluginManager.h

@@ -25,7 +25,7 @@
 #include <QString>
 #include <QServiceManager>
 
-#include <CTKCoreExport.h>
+#include <CTKPluginFrameworkExport.h>
 
 namespace ctk {
 
@@ -33,7 +33,7 @@ namespace ctk {
 
   class PluginManagerPrivate;
 
-  class CTK_CORE_EXPORT PluginManager
+  class CTK_PLUGINFW_EXPORT PluginManager
   {
     Q_DECLARE_PRIVATE(PluginManager)
 

Libs/Core/PluginFramework/ctkPluginManifest.cxx → Libs/PluginFramework/ctkPluginManifest.cxx


Libs/Core/PluginFramework/ctkPluginManifest_p.h → Libs/PluginFramework/ctkPluginManifest_p.h


Libs/Core/PluginFramework/ctkPluginPrivate.cxx → Libs/PluginFramework/ctkPluginPrivate.cxx


Libs/Core/PluginFramework/ctkPluginPrivate_p.h → Libs/PluginFramework/ctkPluginPrivate_p.h


Libs/Core/PluginFramework/ctkPluginStorage.cxx → Libs/PluginFramework/ctkPluginStorage.cxx


Libs/Core/PluginFramework/ctkPluginStorage_p.h → Libs/PluginFramework/ctkPluginStorage_p.h


Libs/Core/PluginFramework/ctkPlugins.cxx → Libs/PluginFramework/ctkPlugins.cxx


Libs/Core/PluginFramework/ctkPlugins_p.h → Libs/PluginFramework/ctkPlugins_p.h


Libs/Core/PluginFramework/ctkServiceReference.cxx → Libs/PluginFramework/ctkServiceReference.cxx


Libs/Core/PluginFramework/ctkServiceReference.h → Libs/PluginFramework/ctkServiceReference.h


Libs/Core/PluginFramework/ctkServiceRegistration.cxx → Libs/PluginFramework/ctkServiceRegistration.cxx


Libs/Core/PluginFramework/ctkServiceRegistration.h → Libs/PluginFramework/ctkServiceRegistration.h


Libs/Core/PluginFramework/ctkVersion.cxx → Libs/PluginFramework/ctkVersion.cxx


+ 3 - 3
Libs/Core/PluginFramework/ctkVersion.h

@@ -25,7 +25,7 @@
 #include <QString>
 #include <QRegExp>
 
-#include "CTKCoreExport.h"
+#include "CTKPluginFrameworkExport.h"
 
 namespace ctk {
 
@@ -48,7 +48,7 @@ namespace ctk {
    * @Immutable
    */
 
-  class CTK_CORE_EXPORT Version {
+  class CTK_PLUGINFW_EXPORT Version {
 
   private:
 
@@ -234,6 +234,6 @@ namespace ctk {
 
 }
 
-CTK_CORE_EXPORT QDebug operator<<(QDebug dbg, const ctk::Version& v);
+CTK_PLUGINFW_EXPORT QDebug operator<<(QDebug dbg, const ctk::Version& v);
 
 #endif // CTKVERSION_H

Libs/Core/PluginFramework/ctkVersionRange.cxx → Libs/PluginFramework/ctkVersionRange.cxx


Libs/Core/PluginFramework/ctkVersionRange_p.h → Libs/PluginFramework/ctkVersionRange_p.h


+ 10 - 0
Libs/PluginFramework/target_libraries.cmake

@@ -0,0 +1,10 @@
+#
+# See CMake/ctkMacroGetTargetLibraries.cmake
+# 
+# This file should list the libraries required to build the current CTK libraries
+#
+
+SET(target_libraries
+  QT_LIBRARIES
+  QTMOBILITY_QTSERVICEFW_LIBRARIES
+  )

+ 2 - 2
Plugins/org.commontk.cli/CMakeLists.txt

@@ -14,11 +14,11 @@ SET(PLUGIN_resources
   org_commontk_cli.qrc
 )
 
-SET(LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH}/Plugins)
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Plugins)
 
 ctkMacroGetTargetLibraries(PLUGIN_target_libraries)
 
-ctkMacroBuildQtPlugin(
+ctkMacroBuildPlugin(
   NAME ${PROJECT_NAME}
   EXPORT_DIRECTIVE ${PLUGIN_export_directive}
   SRCS ${PLUGIN_SRCS}

+ 1 - 1
Plugins/org.commontk.cli/ctkCLIPlugin.h

@@ -8,7 +8,7 @@
 #ifndef CTKCLIPLUGIN_H_
 #define CTKCLIPLUGIN_H_
 
-#include <PluginFramework/ctkPluginActivator.h>
+#include <ctkPluginActivator.h>
 
 #include <QServicePluginInterface>
 

+ 2 - 2
Plugins/org.commontk.eventbus/CMakeLists.txt

@@ -17,11 +17,11 @@ SET(PLUGIN_resources
   org_commontk_eventbus.qrc
 )
 
-SET(LIBRARY_OUTPUT_PATH ${LIBRARY_OUTPUT_PATH}/Plugins)
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Plugins)
 
 ctkMacroGetTargetLibraries(PLUGIN_target_libraries)
 
-ctkMacroBuildQtPlugin(
+ctkMacroBuildPlugin(
   NAME ${PROJECT_NAME}
   EXPORT_DIRECTIVE ${PLUGIN_export_directive}
   SRCS ${PLUGIN_SRCS}

+ 1 - 1
Plugins/org.commontk.eventbus/ctkEventBusPlugin_p.h

@@ -1,7 +1,7 @@
 #ifndef CTKEVENTBUSPLUGIN_H
 #define CTKEVENTBUSPLUGIN_H
 
-#include <PluginFramework/ctkPluginActivator.h>
+#include <ctkPluginActivator.h>
 
 #include <QServicePluginInterface>
 

+ 1 - 1
Plugins/org.commontk.eventbus/ctkEventHandlerWrapper_p.h

@@ -5,7 +5,7 @@
 
 #include <EventBus/ctkEventBus.h>
 #include <EventBus/ctkEventConstants.h>
-#include <PluginFramework/ctkLDAPSearchFilter.h>
+#include <ctkLDAPSearchFilter.h>
 
 #include <iostream>
 

+ 1 - 1
Plugins/org.commontk.eventbus/target_libraries.cmake

@@ -5,5 +5,5 @@
 # 
 
 SET(target_libraries
-  CTKCore
+  CTKPluginFramework
   )

+ 1 - 1
SuperBuild.cmake

@@ -213,7 +213,7 @@ IF(${add_project})
   ENDIF()
 
   ExternalProject_Add(${proj}
-    URL ${CTK_BINARY_DIR}/Utilities/QtMobility/qt-mobility-servicefw-opensource-src-1.0.0.tar.gz
+    URL ${CTK_SOURCE_DIR}/Utilities/QtMobility/qt-mobility-servicefw-opensource-src-1.0.0.tar.gz
     PATCH_COMMAND ${CMAKE_COMMAND} -P ${qtmobility_patchscript}
     CONFIGURE_COMMAND <SOURCE_DIR>/configure -${qtmobility_build_type} -libdir ${CMAKE_BINARY_DIR}/CTK-build/bin -no-docs -modules ${qtmobility_modules}
     BUILD_COMMAND ${qtmobility_make_cmd}

+ 1 - 1
Utilities/QtMobility/QtMobility-1.0.0-patch.cmake.in

@@ -14,7 +14,7 @@ SET(configured_patch_dir @qtmobility_configured_patch_dir@)
 SET(QT_BINARY_DIR @QT_BINARY_DIR@)
 
 SET(patch_files
-  QtMobility-1.0.0.patch
+  ${patch_dir}/QtMobility-1.0.0.patch
 )
 
 IF(WIN32)