summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorChuanbo Weng <chuanbo.weng@intel.com>2015-06-18 16:12:10 +0800
committerYang Rong <rong.r.yang@intel.com>2015-06-19 10:42:12 +0800
commit45ead9765dd1d7fc4b1fdd51aeb3f0047caadcf6 (patch)
tree45bfc643d19b2cdf2868892088c99af35ccf8aa5 /examples
parentabe74a6ea76326c8a6ca3bcdb6de9bbfae65a8fe (diff)
Fix error in CMakeLists.txt of examples.
We check the content of thirdparty/libva by ls command to determine to clone submodule or not, so use OUTPUT_VARIABLE instead of RESULT_VARIABLE. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 2c13eac0..fe4e5f62 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,9 +1,9 @@
-EXECUTE_PROCESS(COMMAND ls "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva" RESULT_VARIABLE LS_RESULT)
-IF (NOT ("LS_RESULT" STREQUAL "0"))
+EXECUTE_PROCESS(COMMAND ls "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva" OUTPUT_VARIABLE LS_RESULT)
+IF ("LS_RESULT" STREQUAL "")
EXECUTE_PROCESS(COMMAND git submodule init WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
EXECUTE_PROCESS(COMMAND git submodule update WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..)
EXECUTE_PROCESS(COMMAND git checkout master WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/libva)
-ENDIF (NOT ("LS_RESULT" STREQUAL "0"))
+ENDIF ("LS_RESULT" STREQUAL "")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/../utests