From 1b83c684fbb88b40a4b3b7114a9116b0e582bc67 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 20 May 2012 14:15:48 -0500 Subject: More resiliency fixes --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index bb85dcc9..046e9b05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -174,7 +174,7 @@ cmake_pop_check_state() include_directories(${CMAKE_INCLUDE_PATH}) macro(find_opt_library_and_header _header_var _header _lib_var _lib _have_var) - if(${_header_var}) + if(${_have_var}) find_path(${_header_var} ${_header}) if(NOT ${_header_var}) set(${_have_var} 0) @@ -184,8 +184,11 @@ macro(find_opt_library_and_header _header_var _header _lib_var _lib _have_var) set(${_have_var} 0) else() include_directories(SYSTEM "${${_header_var}}") + set(${_have_var} 1) endif() endif() + else() + set(${_have_var} 0) endif() endmacro(find_opt_library_and_header _header_var _header _lib_var _lib _have_var) -- cgit v1.2.3