diff options
author | Stefan Radomski <github@mintwerk.de> | 2017-01-27 21:54:43 (GMT) |
---|---|---|
committer | Stefan Radomski <github@mintwerk.de> | 2017-01-27 21:54:43 (GMT) |
commit | 7f83038a1ef642b883417cc984d1f8ca9f0bc64b (patch) | |
tree | fd9236e866a06b250992e84bbf41324adf93a9fd /src/uscxml/plugins/invoker | |
parent | b450411ee8f0a57f3ec3909d65ecc289189e2b35 (diff) | |
download | uscxml-7f83038a1ef642b883417cc984d1f8ca9f0bc64b.zip uscxml-7f83038a1ef642b883417cc984d1f8ca9f0bc64b.tar.gz uscxml-7f83038a1ef642b883417cc984d1f8ca9f0bc64b.tar.bz2 |
Reactivated BUILD_AS_PLUGINS
Diffstat (limited to 'src/uscxml/plugins/invoker')
-rw-r--r-- | src/uscxml/plugins/invoker/CMakeLists.txt | 22 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp | 4 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/dirmon/DirMonInvoker.h | 3 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp | 6 | ||||
-rw-r--r-- | src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h | 3 |
5 files changed, 29 insertions, 9 deletions
diff --git a/src/uscxml/plugins/invoker/CMakeLists.txt b/src/uscxml/plugins/invoker/CMakeLists.txt index 5500e3f..9f50684 100644 --- a/src/uscxml/plugins/invoker/CMakeLists.txt +++ b/src/uscxml/plugins/invoker/CMakeLists.txt @@ -6,7 +6,18 @@ if (WITH_INV_SCXML) file(GLOB_RECURSE USCXML_INVOKER scxml/*.cpp scxml/*.h) + if (BUILD_AS_PLUGINS) + source_group("" FILES ${USCXML_INVOKER}) + add_library(invoker_uscxml SHARED ${USCXML_INVOKER} "../Plugins.cpp") + target_link_libraries(invoker_uscxml + uscxml + ) + set_target_properties(invoker_uscxml PROPERTIES FOLDER "Plugins//Invoker") + set_target_properties(invoker_uscxml PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_uscxml PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/plugins") + else() list (APPEND USCXML_FILES ${USCXML_INVOKER}) + endif() endif() # Directoy Monitor @@ -17,7 +28,18 @@ if (WITH_INV_DIRMON) file(GLOB_RECURSE DIRMON_INVOKER dirmon/*.cpp dirmon/*.h) + if (BUILD_AS_PLUGINS) + source_group("" FILES ${DIRMON_INVOKER}) + add_library(invoker_dirmon SHARED ${DIRMON_INVOKER} "../Plugins.cpp") + target_link_libraries(invoker_dirmon + uscxml + ) + set_target_properties(invoker_dirmon PROPERTIES FOLDER "Plugins//Invoker") + set_target_properties(invoker_dirmon PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS") + set_target_properties(invoker_dirmon PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/plugins") + else() list (APPEND USCXML_FILES ${DIRMON_INVOKER}) + endif() endif() set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE) diff --git a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp index be13bf4..e9cf702 100644 --- a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp +++ b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.cpp @@ -19,8 +19,6 @@ #include "DirMonInvoker.h" -#include "uscxml/config.h" - #ifdef BUILD_AS_PLUGINS #include <Pluma/Connector.hpp> #endif @@ -62,7 +60,7 @@ DirMonInvoker::~DirMonInvoker() { } if (_watcher) delete(_watcher); -}; +} std::shared_ptr<InvokerImpl> DirMonInvoker::create(InvokerCallbacks* callbacks) { std::shared_ptr<DirMonInvoker> invoker(new DirMonInvoker()); diff --git a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.h b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.h index dffbe14..6d9911f 100644 --- a/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.h +++ b/src/uscxml/plugins/invoker/dirmon/DirMonInvoker.h @@ -20,6 +20,7 @@ #ifndef DIRMONINVOKER_H_W09J90F0 #define DIRMONINVOKER_H_W09J90F0 +#include "uscxml/config.h" #include "uscxml/plugins/InvokerImpl.h" #include "uscxml/interpreter/Logging.h" @@ -139,7 +140,7 @@ protected: }; #ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(DirMonInvoker, InvokerImpl); +PLUMA_INHERIT_PROVIDER(DirMonInvoker, InvokerImpl) #endif } diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp index b035993..d3bc5bf 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp @@ -19,8 +19,6 @@ #include "USCXMLInvoker.h" -#include "uscxml/config.h" - #ifdef BUILD_AS_PLUGINS #include <Pluma/Connector.hpp> #endif @@ -52,7 +50,7 @@ USCXMLInvoker::USCXMLInvoker() { USCXMLInvoker::~USCXMLInvoker() { stop(); -}; +} void USCXMLInvoker::start() { _isStarted = true; @@ -184,7 +182,7 @@ void USCXMLInvoker::invoke(const std::string& source, const Event& invokeEvent) InterpreterImpl* invoked = _invokedInterpreter.getImpl().get(); ActionLanguage al = _callbacks->getActionLanguage(); - // create new instances + // create new instances al.execContent = al.execContent.getImpl()->create(invoked); al.delayQueue = al.delayQueue.getImplDelayed()->create(invoked); al.internalQueue = al.internalQueue.getImplBase()->create(); diff --git a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h index d37d2af..61931c6 100644 --- a/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h +++ b/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.h @@ -20,6 +20,7 @@ #ifndef USCXMLINVOKER_H_OQFA21IO #define USCXMLINVOKER_H_OQFA21IO +#include "uscxml/config.h" #include "uscxml/interpreter/InterpreterImpl.h" #include "uscxml/interpreter/BasicEventQueue.h" @@ -88,7 +89,7 @@ protected: }; #ifdef BUILD_AS_PLUGINS -PLUMA_INHERIT_PROVIDER(USCXMLInvoker, InvokerImpl); +PLUMA_INHERIT_PROVIDER(USCXMLInvoker, InvokerImpl) #endif } |