summaryrefslogtreecommitdiffstats
path: root/src/uscxml/plugins/ioprocessor
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-31 21:05:47 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2014-07-31 21:05:47 (GMT)
commita61ef07b5eb3dacfc596a26cb1373356e5673dbb (patch)
tree484f4c1952c493032f8ca42709e001d7cc25be6a /src/uscxml/plugins/ioprocessor
parenteab5c12b2a1b9cfee94e8d0cbe41fb5d78594bb5 (diff)
downloaduscxml-a61ef07b5eb3dacfc596a26cb1373356e5673dbb.zip
uscxml-a61ef07b5eb3dacfc596a26cb1373356e5673dbb.tar.gz
uscxml-a61ef07b5eb3dacfc596a26cb1373356e5673dbb.tar.bz2
Support for ignoring libraries when building and minimal builds
Diffstat (limited to 'src/uscxml/plugins/ioprocessor')
-rw-r--r--src/uscxml/plugins/ioprocessor/CMakeLists.txt146
1 files changed, 75 insertions, 71 deletions
diff --git a/src/uscxml/plugins/ioprocessor/CMakeLists.txt b/src/uscxml/plugins/ioprocessor/CMakeLists.txt
index f09a866..3c882ed 100644
--- a/src/uscxml/plugins/ioprocessor/CMakeLists.txt
+++ b/src/uscxml/plugins/ioprocessor/CMakeLists.txt
@@ -1,42 +1,3 @@
-set(USCXML_IOPROCESSORS "sample ${USCXML_IOPROCESSORS}")
-file(GLOB_RECURSE SAMPLE_IOPROCESSOR
- sample/*.cpp
- sample/*.h
-)
-if (BUILD_AS_PLUGINS)
- source_group("" FILES ${SAMPLE_IOPROCESSOR})
- add_library(
- ioprocessor_sample SHARED
- ${SAMPLE_IOPROCESSOR}
- "../Plugins.cpp")
- target_link_libraries(ioprocessor_sample uscxml)
- set_target_properties(ioprocessor_sample PROPERTIES FOLDER "Plugin IOProcessor")
- set_target_properties(ioprocessor_sample PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS")
- set_target_properties(ioprocessor_sample PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib")
-else()
- list (APPEND USCXML_FILES ${SAMPLE_IOPROCESSOR})
-endif()
-
-set(USCXML_IOPROCESSORS "comet ${USCXML_IOPROCESSORS}")
-file(GLOB_RECURSE COMET_IOPROCESSOR
- comet/*.cpp
- comet/*.h
-)
-if (BUILD_AS_PLUGINS)
- source_group("" FILES ${COMET_IOPROCESSOR})
- add_library(
- ioprocessor_comet SHARED
- ${COMET_IOPROCESSOR}
- "../Plugins.cpp")
- target_link_libraries(ioprocessor_comet uscxml)
- set_target_properties(ioprocessor_comet PROPERTIES FOLDER "Plugin IOProcessor")
- set_target_properties(ioprocessor_comet PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS")
- set_target_properties(ioprocessor_comet PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib")
-else()
- list (APPEND USCXML_FILES ${COMET_IOPROCESSOR})
-endif()
-
-
# LIBEVENT basichttp ioprocessor - this one is already required above
set(USCXML_IOPROCESSORS "basichttp ${USCXML_IOPROCESSORS}")
@@ -59,7 +20,7 @@ else()
endif()
-# scxml ioprocessor - this one is already required above
+# scxml ioprocessor
set(USCXML_IOPROCESSORS "scxml ${USCXML_IOPROCESSORS}")
file(GLOB_RECURSE SCXML_IOPROCESSOR
@@ -87,46 +48,89 @@ else()
endif()
-# mmi ioprocessor
+if (NOT BUILD_MINIMAL)
-if (PROTOBUF_FOUND AND OFF)
-
- if (NOT PROTOBUF_PROTOC_EXECUTABLE)
- message(FATAL_ERROR "protoc binary required for serialization")
+ set(USCXML_IOPROCESSORS "sample ${USCXML_IOPROCESSORS}")
+ file(GLOB_RECURSE SAMPLE_IOPROCESSOR
+ sample/*.cpp
+ sample/*.h
+ )
+ if (BUILD_AS_PLUGINS)
+ source_group("" FILES ${SAMPLE_IOPROCESSOR})
+ add_library(
+ ioprocessor_sample SHARED
+ ${SAMPLE_IOPROCESSOR}
+ "../Plugins.cpp")
+ target_link_libraries(ioprocessor_sample uscxml)
+ set_target_properties(ioprocessor_sample PROPERTIES FOLDER "Plugin IOProcessor")
+ set_target_properties(ioprocessor_sample PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS")
+ set_target_properties(ioprocessor_sample PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib")
+ else()
+ list (APPEND USCXML_FILES ${SAMPLE_IOPROCESSOR})
endif()
- set(USCXML_IOPROCESSORS "mmi ${USCXML_IOPROCESSORS}")
- file(GLOB_RECURSE MMI_IOPROCESSOR
- modality/*.cpp
- modality/*.h
+ set(USCXML_IOPROCESSORS "comet ${USCXML_IOPROCESSORS}")
+ file(GLOB_RECURSE COMET_IOPROCESSOR
+ comet/*.cpp
+ comet/*.h
)
-
- # process .proto files
- file(GLOB_RECURSE PROTOBUF_INTERFACES ${PROJECT_SOURCE_DIR}/contrib/proto/*.proto)
- list (APPEND USCXML_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
-
- PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTOBUF_INTERFACES})
-# set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES GENERATED TRUE)
-
- # this needs to be here for dependencies on the generated proto files
- add_library(mmi_proto STATIC ${PROTO_SRCS})
- set_target_properties(mmi_proto PROPERTIES FOLDER "Generated")
-
if (BUILD_AS_PLUGINS)
- source_group("" FILES ${MMI_IOPROCESSOR})
+ source_group("" FILES ${COMET_IOPROCESSOR})
add_library(
- ioprocessor_mmi SHARED
- ${MMI_IOPROCESSOR}
+ ioprocessor_comet SHARED
+ ${COMET_IOPROCESSOR}
"../Plugins.cpp")
- target_link_libraries(ioprocessor_mmi uscxml mmi_proto)
- set_target_properties(ioprocessor_mmi PROPERTIES FOLDER "Plugin IOProcessor")
- set_target_properties(ioprocessor_mmi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS")
- set_target_properties(ioprocessor_mmi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib")
+ target_link_libraries(ioprocessor_comet uscxml)
+ set_target_properties(ioprocessor_comet PROPERTIES FOLDER "Plugin IOProcessor")
+ set_target_properties(ioprocessor_comet PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS")
+ set_target_properties(ioprocessor_comet PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib")
else()
- list (APPEND USCXML_FILES ${MMI_IOPROCESSOR})
- list (APPEND USCXML_OPT_LIBS mmi_proto)
+ list (APPEND USCXML_FILES ${COMET_IOPROCESSOR})
endif()
-endif()
+
+
+ # mmi ioprocessor
+
+ if (PROTOBUF_FOUND AND OFF)
+
+ if (NOT PROTOBUF_PROTOC_EXECUTABLE)
+ message(FATAL_ERROR "protoc binary required for serialization")
+ endif()
+
+ set(USCXML_IOPROCESSORS "mmi ${USCXML_IOPROCESSORS}")
+ file(GLOB_RECURSE MMI_IOPROCESSOR
+ modality/*.cpp
+ modality/*.h
+ )
+
+ # process .proto files
+ file(GLOB_RECURSE PROTOBUF_INTERFACES ${PROJECT_SOURCE_DIR}/contrib/proto/*.proto)
+ list (APPEND USCXML_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR})
+
+ PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTOBUF_INTERFACES})
+ # set_source_files_properties(${PROTO_SRCS} ${PROTO_HDRS} PROPERTIES GENERATED TRUE)
+
+ # this needs to be here for dependencies on the generated proto files
+ add_library(mmi_proto STATIC ${PROTO_SRCS})
+ set_target_properties(mmi_proto PROPERTIES FOLDER "Generated")
+
+ if (BUILD_AS_PLUGINS)
+ source_group("" FILES ${MMI_IOPROCESSOR})
+ add_library(
+ ioprocessor_mmi SHARED
+ ${MMI_IOPROCESSOR}
+ "../Plugins.cpp")
+ target_link_libraries(ioprocessor_mmi uscxml mmi_proto)
+ set_target_properties(ioprocessor_mmi PROPERTIES FOLDER "Plugin IOProcessor")
+ set_target_properties(ioprocessor_mmi PROPERTIES COMPILE_FLAGS "-DPLUMA_EXPORTS")
+ set_target_properties(ioprocessor_mmi PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${OUTPUT_DIR}/lib")
+ else()
+ list (APPEND USCXML_FILES ${MMI_IOPROCESSOR})
+ list (APPEND USCXML_OPT_LIBS mmi_proto)
+ endif()
+ endif()
+
+endif() # BUILD_MINIMAL
set(USCXML_INCLUDE_DIRS ${USCXML_INCLUDE_DIRS} PARENT_SCOPE)
set(USCXML_OPT_LIBS ${USCXML_OPT_LIBS} PARENT_SCOPE)