summaryrefslogtreecommitdiffstats
path: root/src/plugins/cmake
diff options
context:
space:
mode:
authorNaveen Bobbili <nbobbili@amazon.com>2019-02-25 21:00:09 -0800
committerNaveen Bobbili <nbobbili@amazon.com>2019-02-25 21:06:18 -0800
commit533f49cc00b0846c4f2ebd763b86b917f5023cdc (patch)
tree0950a62bc5c75c24712fefb8532ff82a23f1b947 /src/plugins/cmake
parent800ec166dd48283fd7f3035685e6b6a73091552d (diff)
vshl-capabilities:
This API is responsible for brokering capbilities related messages from voiceagents to apps and vice versa. Verbs exposed are navigation/publish navigation/subscribe phonecontrol/publish phonecontrol/subscribe playbackcontroller/publish playbackcontroller/subscribe guiMetadata/publish guiMetadata/subscribe This API exposes publish and subscribe methods for all the speech framework domains/capabilities. For eg. navigation, phonecontrol etc. This API is used by apps and low level voice agent binding to subscribe and publish these capability messages whenever applicable. This specific commit is for vshl-capabilities API. Change-Id: I822c2e8589e39574d707a7c199bea91a686dced7 Signed-off-by: Naveen Bobbili <nbobbili@amazon.com>
Diffstat (limited to 'src/plugins/cmake')
-rw-r--r--src/plugins/cmake/gtest.cmake44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/plugins/cmake/gtest.cmake b/src/plugins/cmake/gtest.cmake
new file mode 100644
index 0000000..def6559
--- /dev/null
+++ b/src/plugins/cmake/gtest.cmake
@@ -0,0 +1,44 @@
+# gtest
+
+find_package(Threads REQUIRED)
+
+# Enable ExternalProject CMake module
+INCLUDE(ExternalProject)
+
+ExternalProject_Add(
+ gtest
+ URL https://github.com/google/googletest/archive/release-1.8.1.zip
+ SOURCE_DIR "${CMAKE_BINARY_DIR}/gtest-src"
+ BINARY_DIR "${CMAKE_BINARY_DIR}/gtest-build"
+ INSTALL_COMMAND ""
+ LOG_DOWNLOAD ON
+ LOG_CONFIGURE ON
+ LOG_BUILD ON
+)
+
+# Get GTest source and binary directories from CMake project
+ExternalProject_Get_Property(gtest source_dir binary_dir)
+
+# Create a libgtest target to be used as a dependency by test programs
+ADD_LIBRARY(libgtest INTERFACE)
+TARGET_INCLUDE_DIRECTORIES(libgtest
+ INTERFACE
+ ${source_dir}/googletest/include
+)
+TARGET_LINK_LIBRARIES(libgtest
+ INTERFACE
+ ${binary_dir}/googlemock/gtest/libgtest.a
+ ${CMAKE_THREAD_LIBS_INIT}
+)
+
+# Create a libgmock target to be used as a dependency by test programs
+ADD_LIBRARY(libgmock INTERFACE)
+TARGET_INCLUDE_DIRECTORIES(libgmock
+ INTERFACE
+ ${source_dir}/googlemock/include
+)
+TARGET_LINK_LIBRARIES(libgmock
+ INTERFACE
+ ${binary_dir}/googlemock/libgmock.a
+ ${CMAKE_THREAD_LIBS_INIT}
+) \ No newline at end of file