From 2c003d653d056f9125e19f0b5571c1debcdf9a98 Mon Sep 17 00:00:00 2001 From: Stefan Radomski Date: Tue, 14 Jan 2014 17:32:59 +0100 Subject: Don't build expect invoker if tcl is not found --- src/uscxml/plugins/invoker/CMakeLists.txt | 32 ++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/uscxml/plugins/invoker/CMakeLists.txt b/src/uscxml/plugins/invoker/CMakeLists.txt index 607e64e..c6ec719 100644 --- a/src/uscxml/plugins/invoker/CMakeLists.txt +++ b/src/uscxml/plugins/invoker/CMakeLists.txt @@ -97,21 +97,23 @@ endif() # expect invoker -set(USCXML_INVOKERS "expect ${USCXML_INVOKERS}") -file(GLOB_RECURSE EXPECT_INVOKER - expect/*.cpp - expect/*.h -) -if (BUILD_AS_PLUGINS) - source_group("" FILES EXPECT_INVOKER) - add_library( - invoker_expect SHARED - ${EXPECT_INVOKER} - "../Plugins.cpp") - target_link_libraries(invoker_expect uscxml) - set_target_properties(invoker_expect PROPERTIES FOLDER "Plugin Invoker") -else() - list (APPEND USCXML_FILES ${EXPECT_INVOKER}) +if (EXPECT_FOUND AND TCL_FOUND) + set(USCXML_INVOKERS "expect ${USCXML_INVOKERS}") + file(GLOB_RECURSE EXPECT_INVOKER + expect/*.cpp + expect/*.h + ) + if (BUILD_AS_PLUGINS) + source_group("" FILES EXPECT_INVOKER) + add_library( + invoker_expect SHARED + ${EXPECT_INVOKER} + "../Plugins.cpp") + target_link_libraries(invoker_expect uscxml) + set_target_properties(invoker_expect PROPERTIES FOLDER "Plugin Invoker") + else() + list (APPEND USCXML_FILES ${EXPECT_INVOKER}) + endif() endif() -- cgit v0.12