From 12d42768f828d71882ccec113ddce57a4e1c85f7 Mon Sep 17 00:00:00 2001 From: Andrey Kamaev Date: Tue, 10 Apr 2012 08:28:09 +0000 Subject: [PATCH] Slightly improved cmake status report --- CMakeLists.txt | 2 +- cmake/OpenCVUtils.cmake | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 38c85aa..f922cab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -822,7 +822,7 @@ if(UNIX AND NOT APPLE) else() set(HAVE_CAMV4L2_STR "NO") endif() - status(" V4L/V4L2:" HAVE_LIBV4L THEN "Using libv4l (ver ${ALIASOF_libv4l1_VERSION})" ELSE "${HAVE_CAMV4L_STR}/${HAVE_CAMV4L2_STR} (ver ${ALIASOF_libv4l1_VERSION})") + status(" V4L/V4L2:" HAVE_LIBV4L THEN "Using libv4l (ver ${ALIASOF_libv4l1_VERSION})" ELSE "${HAVE_CAMV4L_STR}/${HAVE_CAMV4L2_STR}") status(" Xine:" HAVE_XINE THEN "YES (ver ${ALIASOF_libxine_VERSION}" ELSE NO) if(ANDROID) diff --git a/cmake/OpenCVUtils.cmake b/cmake/OpenCVUtils.cmake index b355e48..687ce4f 100644 --- a/cmake/OpenCVUtils.cmake +++ b/cmake/OpenCVUtils.cmake @@ -151,13 +151,16 @@ function(status text) if(DEFINED status_then OR DEFINED status_else) if(${status_cond}) string(REPLACE ";" " " status_then "${status_then}") + string(REGEX REPLACE "^[ \t]+" "" status_then "${status_then}") ocv_output_status("${status_text} ${status_then}") else() string(REPLACE ";" " " status_else "${status_else}") + string(REGEX REPLACE "^[ \t]+" "" status_else "${status_else}") ocv_output_status("${status_text} ${status_else}") endif() else() string(REPLACE ";" " " status_cond "${status_cond}") + string(REGEX REPLACE "^[ \t]+" "" status_cond "${status_cond}") ocv_output_status("${status_text} ${status_cond}") endif() else() -- 2.7.4