From 539acaf348dfbbfdf653f7d03c3533d4005ae5d2 Mon Sep 17 00:00:00 2001 From: Jose-Luis Blanco-Claraco Date: Tue, 28 Oct 2014 09:46:18 +0100 Subject: [PATCH] OpenCVConfig.cmake: Fix CMake CMP0012 warning "TRUE"/"FALSE" should not be used as literals, as CMake has to decide whether they are literals or variable names (sigh). This patch should make it work with any version of CMake and with any user-side decision on old vs. new policy behavior. --- cmake/templates/OpenCVConfig.cmake.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/templates/OpenCVConfig.cmake.in b/cmake/templates/OpenCVConfig.cmake.in index 5d97474f3..b920d6380 100644 --- a/cmake/templates/OpenCVConfig.cmake.in +++ b/cmake/templates/OpenCVConfig.cmake.in @@ -49,7 +49,7 @@ if(NOT DEFINED OpenCV_MODULES_SUFFIX) endif() endif() -if(@USE_IPPICV@) # value is defined by package builder +if("@USE_IPPICV@" STREQUAL "TRUE") # value is defined by package builder (use STREQUAL to comply new CMake policy CMP0012) if(NOT TARGET ippicv) if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_PATH_RELATIVE_IPPICV@") add_library(ippicv STATIC IMPORTED)