From cd1bea82e87e6b325bf21d8c4f45c9dc15b49a07 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Fri, 10 Oct 2014 14:46:11 +0300 Subject: [PATCH] Updated macros.cmake with different string matching parameters on searched libraries. --- macros.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/macros.cmake b/macros.cmake index afb95f47c..bc1bd24e6 100644 --- a/macros.cmake +++ b/macros.cmake @@ -189,9 +189,10 @@ macro(check_dirs) if(DEFINED RABBITMQ_LIB) find_library(RMQ_LIB rabbitmq PATHS ${RABBITMQ_LIB} NO_DEFAULT_PATH) + else() + find_library(RMQ_LIB rabbitmq) endif() - find_library(RMQ_LIB rabbitmq) - if(RMQ_LIB STREQUAL "RMQ_LIB-NOTFOUND") + if(RMQ_LIB MATCHES "NOTFOUND") set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.") message(FATAL_ERROR "Cannot find RabbitMQ libraries, please define the path to the libraries with -DRABBITMQ_LIB=") else() @@ -201,9 +202,10 @@ macro(check_dirs) if(DEFINED RABBITMQ_HEADERS) find_file(RMQ_HEADERS amqp.h PATHS ${RABBITMQ_HEADERS} NO_DEFAULT_PATH) + else() + find_file(RMQ_HEADERS amqp.h) endif() - find_file(RMQ_HEADERS amqp.h) - if(RMQ_HEADERS STREQUAL "RMQ_HEADERS-NOTFOUND") + if(RMQ_HEADERS MATCHES "NOTFOUND") set(DEPS_OK FALSE CACHE BOOL "If all the dependencies were found.") message(FATAL_ERROR "Cannot find RabbitMQ headers, please define the path to the headers with -DRABBITMQ_HEADERS=") else()