Browse Source

Make the ctkPluginFrameworkTestUtil library shared.

Sascha Zelzer 14 years ago
parent
commit
1234f0e247

+ 3 - 4
Libs/PluginFramework/Testing/Cpp/CMakeLists.txt

@@ -1,5 +1,5 @@
 # Code in this directory will be compiled into
-# a static utility library. Test executables may
+# a utility library. Test executables may
 # link to it to bootstrap a plugin framework and
 # start registered tests.
 
@@ -17,7 +17,6 @@ SET(MY_MOC_CXX )
 
 SET(lib_name ${fwtestutil_lib})
 
-SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
-
-ADD_LIBRARY(${lib_name} STATIC ${SRCS} ${MY_MOC_CXX})
+ADD_LIBRARY(${lib_name} SHARED ${SRCS} ${MY_MOC_CXX})
 TARGET_LINK_LIBRARIES(${lib_name} ${fw_lib})
+

+ 3 - 1
Libs/PluginFramework/Testing/Cpp/ctkPluginFrameworkTestRunner.h

@@ -23,12 +23,14 @@
 #ifndef CTKPLUGINFRAMEWORKTESTRUNNER_H
 #define CTKPLUGINFRAMEWORKTESTRUNNER_H
 
+#include "ctkPluginFrameworkTestUtilExport.h"
+
 #include <ctkPlugin.h>
 #include <ctkPluginFramework_global.h>
 
 class ctkPluginFrameworkTestRunnerPrivate;
 
-class ctkPluginFrameworkTestRunner
+class CTK_PLUGINFW_TESTUTIL_EXPORT ctkPluginFrameworkTestRunner
 {
 
 public:

+ 3 - 1
Libs/PluginFramework/Testing/Cpp/ctkPluginFrameworkTestUtil.h

@@ -23,13 +23,15 @@
 #ifndef CTKPLUGINFRAMEWORKTESTUTIL_H
 #define CTKPLUGINFRAMEWORKTESTUTIL_H
 
+#include "ctkPluginFrameworkTestUtilExport.h"
+
 #include <QString>
 #include <QSharedPointer>
 
 class ctkPlugin;
 class ctkPluginContext;
 
-class ctkPluginFrameworkTestUtil
+class CTK_PLUGINFW_TESTUTIL_EXPORT ctkPluginFrameworkTestUtil
 {
 
 public:

+ 34 - 0
Libs/PluginFramework/Testing/Cpp/ctkPluginFrameworkTestUtilExport.h

@@ -0,0 +1,34 @@
+/*=============================================================================
+
+  Library: CTK
+
+  Copyright (c) 2010 German Cancer Research Center,
+    Division of Medical and Biological Informatics
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+=============================================================================*/
+
+
+#ifndef CTKPLUGINFRAMEWORKTESTUTILEXPORT_H
+#define CTKPLUGINFRAMEWORKTESTUTILEXPORT_H
+
+#include <QtCore/qglobal.h>
+
+#if defined(CTKPluginFrameworkTestUtil_EXPORTS)
+ #define CTK_PLUGINFW_TESTUTIL_EXPORT Q_DECL_EXPORT
+#else
+ #define CTK_PLUGINFW_TESTUTIL_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif // CTKPLUGINFRAMEWORKTESTUTILEXPORT_H