summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 4 insertions, 1 deletions
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)